/* =========================================
   1. GLOBAL (Dùng chung)
   ========================================= */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
}

/* Ẩn thanh Admin Bar của WordPress để tạo cảm giác App */
html { margin-top: 0 !important; }
#wpadminbar { display: none; }
.badge,.badge+.badge{
	    width: fit-content;
    height: auto;
}
/* Các class tiện ích */
.img-thumb {
    width: 40px; height: 40px;
    object-fit: cover;
    border-radius: 5px;
    cursor: zoom-in;
    border: 1px solid #dee2e6;
}

/* =========================================
   2. TRANG ĐĂNG NHẬP (Login)
   ========================================= */
.page-login-body { /* Cần thêm class này vào body trang login nếu muốn specific */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    margin: 0 15px;
}
.brand-logo {
    width: 80px; height: 80px;
    background: #0d6efd;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 32px;
    margin: 0 auto 20px;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.3);
}
.login-card .form-floating > .form-control {
    border-radius: 10px;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
}
.login-card .form-floating > .form-control:focus {
    background-color: #fff; border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.1);
}
.btn-login {
    padding: 12px; border-radius: 10px; font-size: 18px; font-weight: 600;
    background: #0d6efd; border: none; transition: all 0.3s;
}
.btn-login:hover {
    background: #0b5ed7; transform: translateY(-2px);
}
.spinner-overlay {
    display: none; position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.8);
    z-index: 9999;
    align-items: center; justify-content: center; flex-direction: column;
}

/* =========================================
   3. MOBILE APP (Nhân viên)
   ========================================= */
.header-app {
    background: #0d6efd;
    color: white;
    padding: 15px;
    border-radius: 0 0 20px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.form-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 15px;
}
.form-control-app, /* Class chung cho input app */
.form-select-app {
    padding: 12px;
    border-radius: 10px;
    font-size: 16px;
}
.btn-camera {
    border: 2px dashed #ced4da;
    padding: 30px;
    text-align: center;
    border-radius: 15px;
    cursor: pointer;
    background: #fff;
    color: #6c757d;
    transition: all 0.3s;
}
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 10px 20px;
    z-index: 1000;
    display: flex;
    justify-content: space-around;
}

/* Trạng thái phiếu (Status Colors) */
.history-card { border-left: 5px solid #6c757d; margin-bottom: 10px; }
.status-pending { border-left-color: #ffc107; }
.status-approved { border-left-color: #198754; }
.status-rejected { border-left-color: #dc3545; }
.status-draft { border-left-color: #6c757d; opacity: 0.8; }

/* =========================================
   4. DASHBOARD (Kế toán & Admin)
   ========================================= */
.sidebar {
    width: 250px;
    height: 100vh;
    background: #212529;
    color: white;
    position: fixed;
    top: 0; left: 0;
    padding-top: 20px;
    transition: all 0.3s;
    z-index: 999;
}
.sidebar-link {
    padding: 15px 20px;
    color: #adb5bd;
    text-decoration: none;
    display: block;
    border-left: 4px solid transparent;
}
.sidebar-link:hover, .sidebar-link.active {
    background: #343a40;
    color: white;
    border-left-color: #0d6efd;
}
.main-content {
    margin-left: 250px;
    padding: 20px;
}
.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-left: 5px solid #0d6efd;
}
.table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    padding: 20px; /* Thống nhất padding */
}
.table thead {
    background-color: #f8f9fa;
    color: #495057;
}

/* Ô Copy màu vàng (One Click Copy) */
.content-box {
    background: #fff3cd;
    font-family: 'Consolas', 'Courier New', monospace;
    padding: 8px;
    border-radius: 5px;
    border: 1px dashed #ffc107;
    color: #856404;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
}
.content-box:hover {
    background: #ffecb5;
    border-style: solid;
}

/* Nút hành động tròn */
.btn-action {
    width: 40px; 
	height: 40px;
    padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    margin: 0 2px;
}

/* Toast Notification */
.toast-container {
    position: fixed; bottom: 20px; right: 20px; z-index: 9999;
}

/* Avatar nhân viên (Quản lý NV) */
.avatar-circle {
    width: 40px; height: 40px;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    text-transform: uppercase;
}

/* Debug Box */
.debug-box {
    background: #333;
    color: #0f0;
    padding: 15px;
    margin-bottom: 20px;
    font-family: monospace;
    font-size: 12px;
    overflow-x: auto;
}
/* =========================================
   5. TRANG CẤU HÌNH (MAPPING)
   ========================================= */
.mapping-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    min-height: 500px;
}
.arrow-icon {
    color: #0d6efd; font-size: 1.2rem;
}

/* Style cho ô nhập mã ERP (Nhìn cho giống Code) */
.output-input { 
    font-family: 'Consolas', 'Monaco', monospace; 
    color: #d63384; 
    font-weight: bold; 
    background-color: #fff0f6; 
    border: 1px dashed #d63384; 
}
.output-input:focus { 
    background: white; 
    border-style: solid; 
    box-shadow: 0 0 0 0.25rem rgba(214, 51, 132, 0.25); 
    border-color: #d63384; 
}

/* Input App (Bên trái) */
.app-input {
    font-weight: 500;
    color: #495057;
}

/* Tab Navigation */
.nav-tabs .nav-link { color: #6c757d; }
.nav-tabs .nav-link.active { color: #0d6efd; font-weight: bold; border-bottom: 3px solid #0d6efd; }