/* Dr.Chain Style Dashboard */
:root {
    --primary-blue: #2563eb;
    --primary-blue-dark: #1e40af;
    --primary-blue-light: #3b82f6;
    --sidebar-bg: #1e40af;
    --sidebar-hover: #2563eb;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --bg-white: #ffffff;
    --bg-gray: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-lg: 12px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-gray);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .header-nav-link,
    .sidebar-menu-link,
    .header-notification,
    .header-profile {
        min-height: 44px;
        min-width: 44px;
    }
    
    .form-control {
        min-height: 44px;
    }
}

/* Top Header */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 24px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.header-logo i {
    font-size: 24px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-nav-link {
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.header-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

.header-nav-link.active {
    background: #dc2626;
    color: white;
    border-bottom: 2px solid #dc2626;
}

.header-nav-link-dropdown.active {
    background: #dc2626;
    color: white;
    border-bottom: 2px solid #dc2626;
}

.header-nav-link-dropdown {
    cursor: pointer;
}

.header-nav-link-dropdown i {
    font-size: 12px;
    transition: transform 0.2s;
}

.header-nav-link-dropdown.open i {
    transform: rotate(180deg);
}

.header-nav-dropdown {
    position: relative;
}

.header-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    min-width: 220px;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
    padding: 4px 0;
}

.header-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-dropdown-item {
    display: block;
    padding: 10px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.header-dropdown-item:hover {
    background: var(--bg-gray);
    color: var(--primary-blue);
    text-decoration: none;
    border-left-color: var(--primary-blue);
}

.header-dropdown-item.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-blue);
    border-left-color: var(--primary-blue);
    font-weight: 500;
}

.header-nav-link-notification {
    position: relative;
    padding: 8px 12px;
}

.header-nav-link-notification i {
    font-size: 18px;
}

.notification-badge-top {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1.4;
    border: 2px solid var(--primary-blue);
}

.header-search {
    flex: 0 0 auto;
    max-width: 300px;
    width: 300px;
    margin: 0 16px;
    position: relative;
}

.header-search input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.2s;
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.header-search input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    width: 350px;
    max-width: 350px;
}

.header-search i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* Search Results */
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1002;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.search-results.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.search-results-loading {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.search-results-loading i {
    margin-right: 8px;
}

.search-results-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.search-results-section {
    padding: 8px 0;
}

.search-results-section-title {
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    background: var(--bg-gray);
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-results-section-title i {
    font-size: 12px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background-color 0.2s;
    border-left: 3px solid transparent;
}

.search-result-item:hover {
    background: var(--bg-gray);
    text-decoration: none;
    color: var(--text-primary);
    border-left-color: var(--primary-blue);
}

.search-result-item-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.search-result-item-icon.employee {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-blue);
}

.search-result-item-icon.customer {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.search-result-item-icon.product {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.search-result-item-info {
    flex: 1;
    min-width: 0;
}

.search-result-item-name {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-item-detail {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-notification {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.header-notification:hover {
    background: rgba(255, 255, 255, 0.2);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--bg-white);
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.header-profile:hover {
    background: rgba(255, 255, 255, 0.1);
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-name {
    font-weight: 600;
    font-size: 14px;
    color: white;
    line-height: 1.2;
}

.profile-role {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.2;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 200px;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1001;
}

.header-profile:hover .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-item {
    display: block;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.profile-dropdown-item:last-child {
    border-bottom: none;
}

.profile-dropdown-item:hover {
    background: var(--bg-gray);
    color: var(--text-primary);
    text-decoration: none;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 64px;
    bottom: 0;
    width: 280px;
    background: var(--sidebar-bg);
    color: white;
    overflow-y: auto;
    z-index: 999;
    box-shadow: var(--shadow-lg);
    -webkit-overflow-scrolling: touch;
    display: none;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--sidebar-bg);
}

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

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.sidebar-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.sidebar-user-info {
    flex: 1;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.sidebar-user-role {
    font-size: 12px;
    opacity: 0.8;
}

.sidebar-setup {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 12px;
    margin-top: 16px;
}

.sidebar-setup-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.sidebar-setup-progress {
    font-size: 11px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.sidebar-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.sidebar-progress-fill {
    height: 100%;
    background: white;
    border-radius: 2px;
    transition: width 0.3s;
}

.sidebar-menu {
    padding: 16px 0;
}

.sidebar-menu-item {
    margin: 4px 0;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
    position: relative;
}

.sidebar-menu-link i {
    width: 20px;
    font-size: 18px;
    text-align: center;
}

.sidebar-menu-link:hover {
    background: var(--sidebar-hover);
    color: white;
    text-decoration: none;
}

.sidebar-menu-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.sidebar-menu-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: white;
}

.sidebar-upgrade {
    margin: 16px 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    text-align: center;
}

.sidebar-upgrade-btn {
    display: inline-block;
    padding: 10px 20px;
    background: white;
    color: var(--primary-blue);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.sidebar-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: var(--primary-blue);
    text-decoration: none;
}

/* Main Content */
.main-content-wrapper {
    margin-left: 0;
    margin-top: 64px;
    padding: 24px;
    min-height: calc(100vh - 64px);
    background: var(--bg-gray);
}

/* Unified Page Wrapper */
.page-wrapper {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

/* Global Page Content Styles - Applied to all pages */
.main-content-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.main-content-wrapper * {
    box-sizing: border-box;
}

/* Unified Link Styles */
.main-content-wrapper a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.2s;
}

.main-content-wrapper a:hover {
    color: var(--primary-blue-dark);
    text-decoration: underline;
}

.main-content-wrapper a i {
    transition: transform 0.2s;
}

.main-content-wrapper a:hover i {
    transform: scale(1.1);
}

/* Unified Label Styles */
.main-content-wrapper .form-label,
.main-content-wrapper label {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: block;
}

/* Unified Small Text */
.main-content-wrapper small {
    font-size: 12px;
    color: var(--text-secondary);
}

.main-content-wrapper .text-muted {
    color: var(--text-secondary) !important;
}

/* Unified Strong/Bold */
.main-content-wrapper b,
.main-content-wrapper strong {
    font-weight: 600;
    color: var(--text-primary);
}

/* Unified FS Classes */
.fs-6 {
    font-size: 14px !important;
}

.fs-5 {
    font-size: 16px !important;
}

.fs-4 {
    font-size: 18px !important;
}

/* Stock Info Badges - Unified */
.stock-info {
    font-size: 12px;
    margin-top: 5px;
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
    font-weight: 500;
}

.stock-available {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: 1px solid #10b981;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.stock-low {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    border: 1px solid #f59e0b;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.stock-out {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    border: 1px solid #ef4444;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.stock-icon {
    margin-right: 4px;
}

.cart_item_stock {
    margin-top: 8px;
    font-weight: 500;
    font-size: 13px;
}

/* Pagination - Unified */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin: 24px 0;
    padding: 0;
    list-style: none;
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-link {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    background: var(--bg-white);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
}

.pagination .page-link:hover {
    background: var(--bg-gray);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.pagination .page-item.active .page-link {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-gray);
}

/* Modal - Unified */
.modal-content {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
    background: var(--bg-gray);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
    background: var(--bg-gray);
}

/* Col Classes - Unified */
.col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
.col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
    padding: 0 8px;
}

@media (max-width: 768px) {
    .col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
    .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
        padding: 0 4px;
        margin-bottom: 8px;
    }
}

/* Override Bootstrap table styles to match unified design */
.main-content-wrapper .table {
    background: var(--bg-white);
    border-collapse: collapse;
}

.main-content-wrapper .table-bordered {
    border: 1px solid var(--border-color);
}

.main-content-wrapper .table-bordered th,
.main-content-wrapper .table-bordered td {
    border: 1px solid var(--border-color);
}

.main-content-wrapper .table-hover tbody tr:hover {
    background: var(--bg-gray);
}

.main-content-wrapper .table-striped tbody tr:nth-of-type(odd) {
    background: rgba(0, 0, 0, 0.02);
}

.main-content-wrapper .table-sm th,
.main-content-wrapper .table-sm td {
    padding: 8px 12px;
    font-size: 13px;
}

.main-content-wrapper .table-primary {
    background: rgba(37, 99, 235, 0.1);
}

.main-content-wrapper .table-primary th {
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary-blue);
    font-weight: 600;
}

/* Ensure all tables have proper styling */
.main-content-wrapper table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
}

.main-content-wrapper table thead {
    background: var(--bg-gray);
}

.main-content-wrapper table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
}

.main-content-wrapper table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.main-content-wrapper table tbody tr:last-child td {
    border-bottom: none;
}

/* Ensure all cards use unified styling */
.main-content-wrapper .card,
.main-content-wrapper .shadow-sm,
.main-content-wrapper .rounded,
.main-content-wrapper .bordered {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.2s;
}

.main-content-wrapper .card:hover,
.main-content-wrapper .shadow-sm:hover,
.main-content-wrapper .rounded:hover,
.main-content-wrapper .bordered:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Ensure all input groups are styled */
.main-content-wrapper .input-group {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.main-content-wrapper .input-group .form-control {
    flex: 1;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    font-size: 14px;
}

.main-content-wrapper .input-group-text {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-gray);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 14px;
}

/* Ensure all buttons are styled */
.main-content-wrapper .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.main-content-wrapper .btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.main-content-wrapper .btn-primary {
    background: var(--primary-blue);
    color: white;
}

.main-content-wrapper .btn-primary:hover {
    background: var(--primary-blue-dark);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.main-content-wrapper .btn-success {
    background: #10b981;
    color: white;
}

.main-content-wrapper .btn-success:hover {
    background: #059669;
    color: white;
}

.main-content-wrapper .btn-danger {
    background: #ef4444;
    color: white;
}

.main-content-wrapper .btn-danger:hover {
    background: #dc2626;
    color: white;
}

.main-content-wrapper .btn-secondary {
    background: var(--bg-gray);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.main-content-wrapper .btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
}

.main-content-wrapper .btn-outline-primary {
    background: transparent;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
}

.main-content-wrapper .btn-outline-primary:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Unified Table Wrapper */
.table-wrapper {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 0;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 24px;
}

.table-wrapper .table {
    margin: 0;
    border: none;
}

.table-wrapper .table thead {
    background: var(--bg-gray);
}

.table-wrapper .table th {
    border-top: none;
    border-bottom: 2px solid var(--border-color);
}

/* Employee Card Styles - Unified */
.employee-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    background: var(--bg-white);
    transition: all 0.3s ease;
    position: relative;
    min-height: 140px;
    overflow: visible;
    box-shadow: var(--shadow);
}

.employee-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.employee-card.new {
    border-left: 4px solid #10b981;
}

.employee-card.warning {
    border-left: 4px solid #f59e0b;
}

.employee-card.danger {
    border-left: 4px solid #ef4444;
}

.employee-card.resigned {
    border-left: 4px solid var(--text-secondary);
    opacity: 0.85;
    background: var(--bg-gray);
}

.employee-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
}

.employee-info {
    flex: 1;
    margin-left: 15px;
}

.employee-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.employee-job {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.employee-stats {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 8px 12px;
    background: var(--bg-gray);
    border-radius: var(--radius);
    min-width: 60px;
}

.stat-value {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.employee-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
}

.resigned-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--text-secondary);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
}

/* Unified Dropdown Menu */
.dropdown-menu {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 4px 0;
    z-index: 99999 !important;
    min-width: 160px;
}

.dropdown-item {
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.2s;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--bg-gray);
    color: var(--text-primary);
}

.dropdown-item:active {
    background: var(--primary-blue);
    color: white;
}

.dropdown-toggle {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    padding: 6px 12px;
    transition: all 0.2s;
}

.dropdown-toggle:hover {
    background: var(--bg-gray);
    border-color: var(--border-color);
}

.dropdown-toggle:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Cards */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-gray);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.blue {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-blue);
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-icon.yellow {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.stat-icon.red {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 8px 0 0 0;
    font-weight: 500;
}

.stat-description {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Tables - Unified Style */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    margin: 0;
}

.table thead {
    background: var(--bg-gray);
}

.table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--bg-gray);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Bootstrap table overrides */
.table-bordered {
    border: 1px solid var(--border-color);
}

.table-bordered th,
.table-bordered td {
    border: 1px solid var(--border-color);
}

.table-hover tbody tr:hover {
    background: var(--bg-gray);
}

.table-striped tbody tr:nth-of-type(odd) {
    background: rgba(0, 0, 0, 0.02);
}

.table-sm th,
.table-sm td {
    padding: 8px 12px;
    font-size: 13px;
}

.table-primary {
    background: rgba(37, 99, 235, 0.1);
}

.table-primary th {
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary-blue);
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary-blue-dark);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--bg-gray);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
    color: white;
    text-decoration: none;
}

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

.btn-danger:hover {
    background: #dc2626;
    color: white;
    text-decoration: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-white);
    color: var(--text-primary);
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}


/* Responsive */
@media (max-width: 1024px) {
    /* Hide desktop navigation */
    .header-nav {
        display: none !important;
    }
    
    /* Show mobile menu toggle button - FORCE VISIBLE */
    .mobile-menu-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 44px !important;
        height: 44px !important;
        flex-shrink: 0 !important;
        order: -1;
        position: relative !important;
        z-index: 1001 !important;
    }
    
    /* Hide close button by default */
    .mobile-menu-close {
        display: none !important;
    }
    
    /* Show close button when sidebar is open */
    body:has(.sidebar.open) .mobile-menu-close,
    .sidebar.open ~ .top-header .mobile-menu-close {
        display: flex !important;
    }
    
    /* Sidebar opens from right */
    .sidebar {
        left: auto;
        right: 0;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        width: 280px;
        display: block;
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .main-content-wrapper {
        margin-left: 0;
    }
    
    .header-search {
        display: none;
    }
    
    .header-profile .profile-info {
        display: none;
    }
    
    .header-profile .bi-chevron-down {
        display: none;
    }
    
    /* Adjust header padding for mobile */
    .top-header {
        padding: 0 12px;
    }
    
    .header-left {
        gap: 8px;
        flex: 0 0 auto;
    }
}

@media (max-width: 768px) {
    .top-header {
        height: 56px;
        padding: 0 12px;
    }
    
    .header-left {
        gap: 8px;
        flex: 0 0 auto;
    }
    
    .header-logo {
        font-size: 18px;
        flex-shrink: 1;
        min-width: 0;
    }
    
    .header-logo i {
        font-size: 20px;
    }
    
    .header-logo span {
        font-size: 18px;
    }
    
    .header-nav {
        display: none;
    }
    
    .header-search {
        display: none;
    }
    
    .header-dropdown-menu {
        position: fixed;
        left: 50% !important;
        transform: translateX(-50%) translateY(-10px);
        min-width: 280px;
        max-width: 90vw;
    }
    
    .header-dropdown-menu.show {
        transform: translateX(-50%) translateY(0);
    }
    
    .header-right {
        gap: 8px;
        flex: 0 0 auto;
    }
    
    .header-notification {
        width: 36px;
        height: 36px;
    }
    
    .profile-avatar {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    /* Ensure hamburger button is visible and properly sized */
    .mobile-menu-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 40px !important;
        height: 40px !important;
        flex-shrink: 0 !important;
        order: -1;
    }
    
    .mobile-menu-close {
        width: 40px;
        height: 40px;
        right: 8px;
    }
    
    .main-content-wrapper {
        margin-top: 56px;
        padding: 12px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .card {
        margin-bottom: 16px;
    }
    
    .card-header,
    .card-body {
        padding: 16px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        font-size: 13px;
    }
    
    .table th,
    .table td {
        padding: 8px;
        white-space: nowrap;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .btn-sm {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .top-header {
        height: 52px;
        padding: 0 10px;
    }
    
    .header-left {
        gap: 6px;
    }
    
    .header-logo {
        font-size: 16px;
    }
    
    .header-logo i {
        font-size: 18px;
    }
    
    .header-logo span {
        font-size: 16px;
    }
    
    /* Ensure hamburger button is visible on small screens */
    .mobile-menu-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 36px !important;
        height: 36px !important;
        flex-shrink: 0 !important;
        order: -1;
    }
    
    .mobile-menu-close {
        width: 36px;
        height: 36px;
        right: 6px;
        font-size: 18px;
    }
    
    .hamburger-icon {
        width: 18px;
        height: 14px;
        gap: 3px;
    }
    
    .hamburger-icon span {
        width: 18px;
        height: 2px;
    }
    
    .header-right {
        gap: 6px;
    }
    
    .header-notification {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .profile-avatar {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    
    .main-content-wrapper {
        margin-top: 52px;
        padding: 8px;
    }
    
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-bottom: 12px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .stats-grid {
        gap: 8px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .card-header,
    .card-body,
    .card-footer {
        padding: 12px;
    }
    
    .card-title {
        font-size: 15px;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table th,
    .table td {
        padding: 6px 4px;
    }
    
    .btn {
        padding: 10px 14px;
        font-size: 13px;
        width: 100%;
        justify-content: center;
    }
    
    .btn-group .btn {
        width: auto;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .sidebar {
        width: 100%;
        max-width: 320px;
    }
    
    .sidebar-header {
        padding: 20px 16px;
    }
    
    .sidebar-user-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .sidebar-user-name {
        font-size: 15px;
    }
    
    .sidebar-user-role {
        font-size: 11px;
    }
    
    .sidebar-menu-link {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .sidebar-menu-link i {
        font-size: 16px;
    }
    
    .sidebar-upgrade {
        margin: 12px 16px;
        padding: 12px;
    }
    
    .sidebar-upgrade-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .top-header {
        padding: 0 8px;
    }
    
    .header-logo span {
        display: none;
    }
    
    .header-logo i {
        margin-right: 0;
    }
    
    .main-content-wrapper {
        padding: 6px;
    }
    
    .card-header,
    .card-body {
        padding: 10px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 20px;
    }
}

/* Mobile Menu Toggle - Hamburger Icon */
.mobile-menu-toggle {
    display: none;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    padding: 0;
    position: relative;
    z-index: 1001;
}

.mobile-menu-toggle:hover {
    background: rgba(0, 0, 0, 0.4);
}

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

.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 16px;
    gap: 4px;
}

.hamburger-icon span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover .hamburger-icon span {
    background: rgba(255, 255, 255, 0.9);
}

/* Mobile Menu Close Button */
.mobile-menu-close {
    display: none;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

.mobile-menu-close:hover {
    background: rgba(0, 0, 0, 0.4);
}

.mobile-menu-close:active {
    transform: translateY(-50%) scale(0.95);
}

/* Bootstrap Compatibility */
.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.rounded {
    border-radius: var(--radius) !important;
}

.rounded-lg {
    border-radius: var(--radius-lg) !important;
}

.bordered {
    border: 1px solid var(--border-color) !important;
}

/* Alert Styles */
.alert {
    border-radius: var(--radius);
    border: none;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-left: 4px solid #ef4444;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-left: 4px solid #f59e0b;
}

.alert-info {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-blue-dark);
    border-left: 4px solid var(--primary-blue);
}

/* Page Headers - Unified Style */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Unified Page Content Styles */
.main-content-wrapper .d-flex.justify-content-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.main-content-wrapper h1.h4,
.main-content-wrapper h1,
.main-content-wrapper h2,
.main-content-wrapper h3,
.main-content-wrapper h4 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
}

.main-content-wrapper .pt-3,
.main-content-wrapper .pb-2,
.main-content-wrapper .mb-3 {
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.main-content-wrapper .border-bottom {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

/* Unified Alert Styles */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 1px solid;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.alert i {
    font-size: 18px;
    flex-shrink: 0;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #065f46;
}

.alert-success i {
    color: #10b981;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #991b1b;
}

.alert-danger i {
    color: #ef4444;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
    color: #92400e;
}

.alert-warning i {
    color: #f59e0b;
}

.alert-info {
    background: rgba(6, 182, 212, 0.1);
    border-color: #06b6d4;
    color: #164e63;
}

.alert-info i {
    color: #06b6d4;
}

.alert-primary {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary-blue);
    color: #1e3a8a;
}

.alert-primary i {
    color: var(--primary-blue);
}

.btn-close {
    margin-left: auto;
    padding: 0;
    background: transparent;
    border: none;
    opacity: 0.5;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.btn-close:hover {
    opacity: 1;
}

/* Unified Text Styles */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-end { text-align: right; }
.text-start { text-align: left; }

.text-muted {
    color: var(--text-secondary) !important;
}

.text-primary {
    color: var(--primary-blue) !important;
}

.text-success {
    color: #10b981 !important;
}

.text-danger {
    color: #ef4444 !important;
}

.text-warning {
    color: #f59e0b !important;
}

.text-info {
    color: #06b6d4 !important;
}

/* Unified Spacing */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }
.mb-4 { margin-bottom: 32px !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 8px !important; }
.p-2 { padding: 16px !important; }
.p-3 { padding: 24px !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: 8px !important; }
.pt-2 { padding-top: 16px !important; }
.pt-3 { padding-top: 24px !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: 8px !important; }
.pb-2 { padding-bottom: 16px !important; }
.pb-3 { padding-bottom: 24px !important; }

/* Unified Display */
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-none { display: none !important; }

.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-grow-1 { flex-grow: 1 !important; }

.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-start { justify-content: flex-start !important; }

.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* Login Page Styles - Dr.Chain Style */
.login-page-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.login-page-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.login-page-wrapper {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.login-page-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-page-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: white;
    padding: 40px 32px 32px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.login-logo-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fbbf24;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.login-logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.login-logo-main {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    color: white;
}

.login-logo-sub {
    font-size: 14px;
    font-weight: 600;
    color: #fbbf24;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.login-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 8px 0;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-subtitle {
    font-size: 15px;
    margin: 0;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.login-page-form {
    padding: 32px;
}

.login-form-group {
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}

.login-form-group:nth-child(1) { animation-delay: 0.1s; }
.login-form-group:nth-child(2) { animation-delay: 0.2s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-form-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
}

.login-form-label i {
    color: var(--primary-blue);
    font-size: 18px;
}

.login-form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-white);
    color: var(--text-primary);
    transition: all 0.2s;
    font-family: inherit;
}

.login-form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.login-form-group.focused .login-form-label {
    color: var(--primary-blue);
}

.login-form-group.focused .login-form-label i {
    color: var(--primary-blue);
    transform: scale(1.1);
}

.login-form-group.has-value .login-form-label {
    color: #10b981;
}

.login-form-group.has-value .login-form-label i {
    color: #10b981;
}

.login-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-left: 4px solid #ef4444;
}

.login-alert i {
    font-size: 18px;
}

.login-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0;
    animation: fadeInUp 0.5s ease-out 0.3s forwards;
    font-family: inherit;
}

.login-btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.login-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.login-btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.login-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-btn-primary.loading {
    position: relative;
    color: transparent;
}

.login-btn-primary.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.login-page-footer {
    padding: 20px 32px;
    background: var(--bg-gray);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.login-page-footer p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Shake animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

.login-page-card.shake {
    animation: shake 0.5s ease-in-out;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: none !important;
    opacity: 0;
}

@media (max-width: 1024px) {
    .sidebar-overlay.active {
        display: none !important;
    }
}

/* Responsive - Login Page */
@media (max-width: 768px) {
    .login-page-container {
        padding: 16px;
    }
    
    .login-page-wrapper {
        max-width: 100%;
    }
    
    .login-page-header {
        padding: 32px 24px 24px 24px;
    }
    
    .login-logo {
        flex-direction: column;
        gap: 12px;
    }
    
    .login-logo-text {
        align-items: center;
    }
    
    .login-logo-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    .login-logo-main {
        font-size: 28px;
    }
    
    .login-logo-sub {
        font-size: 12px;
    }
    
    .login-title {
        font-size: 22px;
    }
    
    .login-subtitle {
        font-size: 14px;
    }
    
    .login-page-form {
        padding: 24px;
    }
    
    .login-form-group {
        margin-bottom: 20px;
    }
    
    .login-form-control {
        padding: 12px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .login-btn {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .login-page-footer {
        padding: 16px 24px;
    }
}

@media (max-width: 480px) {
    .login-page-container {
        padding: 12px;
    }
    
    .login-page-card {
        border-radius: 16px;
    }
    
    .login-page-header {
        padding: 24px 20px 20px 20px;
    }
    
    .login-logo-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
    
    .login-logo-main {
        font-size: 24px;
    }
    
    .login-logo-sub {
        font-size: 11px;
    }
    
    .login-title {
        font-size: 20px;
    }
    
    .login-subtitle {
        font-size: 13px;
    }
    
    .login-page-form {
        padding: 20px;
    }
    
    .login-form-label {
        font-size: 13px;
    }
    
    .login-form-control {
        padding: 12px;
        font-size: 16px;
    }
    
    .login-btn {
        padding: 12px 18px;
        font-size: 15px;
    }
    
    .login-page-footer {
        padding: 12px 20px;
    }
    
    .login-page-footer p {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .login-page-container {
        padding: 8px;
    }
    
    .login-page-header {
        padding: 20px 16px 16px 16px;
    }
    
    .login-logo-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .login-logo-main {
        font-size: 22px;
    }
    
    .login-title {
        font-size: 18px;
    }
    
    .login-page-form {
        padding: 16px;
    }
}

/* Override old navigation styles */
body .navigation.desktop-nav,
body .navigation.mobile-nav {
    display: none !important;
}

body .sidebar#sidebarMenu {
    display: none !important;
}

/* Ensure main content doesn't have old margin */
body #main_content {
    margin-top: 0 !important;
}

/* Hide old container-fluid structure */
body .container-fluid {
    padding: 0 !important;
}

body .row {
    margin: 0 !important;
}

/* Unified Card Styles for all pages */
.col-12.p-3.shadow-sm.rounded.bordered,
.shadow-sm.rounded.bordered,
.card-unified {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 20px !important;
    margin-bottom: 16px;
    transition: all 0.2s;
}

.col-12.p-3.shadow-sm.rounded.bordered:hover,
.shadow-sm.rounded.bordered:hover,
.card-unified:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.col-12.p-3.shadow-sm.rounded.bordered h4,
.shadow-sm.rounded.bordered h4,
.card-unified h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.col-12.p-3.shadow-sm.rounded.bordered h5,
.shadow-sm.rounded.bordered h5,
.card-unified h5 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.col-12.p-3.shadow-sm.rounded.bordered .acc-amount,
.shadow-sm.rounded.bordered .acc-amount,
.card-unified .acc-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 0;
}

/* Unified Input Group Styles */
.input-group {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.input-group .form-control {
    flex: 1;
    border-radius: var(--radius);
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-gray);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 14px;
}

.input-group .btn {
    border-radius: var(--radius);
}

/* Unified Form Styles */
.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-white);
    color: var(--text-primary);
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.form-check-label {
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    margin: 0;
}

/* Unified Button Group */
.btn-group {
    display: inline-flex;
    gap: 0;
    border-radius: var(--radius);
    overflow: hidden;
}

.btn-group .btn {
    border-radius: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-group .btn:first-child {
    border-top-left-radius: var(--radius);
    border-bottom-left-radius: var(--radius);
}

.btn-group .btn:last-child {
    border-top-right-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    border-right: none;
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
}

.btn-outline-primary:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Unified Row and Column Styles */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -8px;
}

.row > * {
    padding: 0 8px;
}

.gx-1 {
    gap: 8px;
}

.gx-2 {
    gap: 16px;
}

.gx-3 {
    gap: 24px;
}

.pe-2 {
    padding-right: 8px;
}

/* Unified Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    line-height: 1.2;
}

.bg-primary {
    background: var(--primary-blue) !important;
    color: white;
}

.bg-success {
    background: #10b981 !important;
    color: white;
}

.bg-danger {
    background: #ef4444 !important;
    color: white;
}

.bg-warning {
    background: #f59e0b !important;
    color: white;
}

.bg-info {
    background: #06b6d4 !important;
    color: white;
}

.bg-secondary {
    background: var(--text-secondary) !important;
    color: white;
}

