:root {
--primary-color: #3498db;
--success-color: #2ecc71;
--warning-color: #f1c40f;
--danger-color: #e74c3c;
--bg-color: #f6f8fa;
--auth-bg-color: #e0e6ed;
--sidebar-color: #2c3e50;
--text-primary: #333;
--text-secondary: #7f8c8d;
--border-color: #ddd;
--shadow-main: 0 4px 15px rgba(0,0,0,0.08);
--shadow-small: 0 2px 5px rgba(0,0,0,0.04);
}

body {
     font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
background: var(--bg-color);
color: var(--text-primary);
line-height: 1.6;
}

.hidden { display: none !important; }

/* KHU VỰC XÁC THỰC - CĂN GIỮA TUYỆT ĐỐI */
#auth-view {
width: 100vw;
height: 100vh;
background: var(--auth-bg-color);
display: flex;
justify-content: center;
align-items: center;
}

.auth-box {
width: 400px;
background: white;
padding: 40px;
border-radius: 12px;
box-shadow: var(--shadow-main);
text-align: center;
transition: all 0.3s ease;
}

.auth-box h2 {
color: var(--sidebar-color);
margin: 0 0 5px 0;
}

.auth-box p {
color: var(--text-secondary);
font-size: 14px;
margin-bottom: 30px;
}

.input-group {
position: relative;
margin-bottom: 20px;
}

.log-icon {
position: absolute;
left: 15px;
top: 50%;
transform: translateY(-50%);
color: var(--text-secondary);
}

.auth-box input, 
.auth-box select {
width: 100%;
padding: 15px 15px 15px 45px;
border: 1px solid var(--border-color);
border-radius: 8px;
box-sizing: border-box;
font-size: 15px;
background: #fdfdfd;
}

.auth-box input:focus, 
.auth-box select:focus {
border-color: var(--primary-color);
outline: none;
box-shadow: 0 0 5px rgba(52,152,219,0.3);
}

.btn-primary-auth, 
.btn-success-auth, 
.btn-warning-auth {
width: 100%;
padding: 15px;
border: none;
border-radius: 8px;
cursor: pointer;
font-size: 16px;
font-weight: bold;
color: white;
transition: 0.2s;
}

.btn-primary-auth { background: var(--primary-color); }
.btn-primary-auth:hover { background: #2980b9; }
.btn-success-auth { background: var(--success-color); }
.btn-success-auth:hover { background: #27ae60; }
.btn-warning-auth { background: var(--warning-color); }
.btn-warning-auth:hover { background: #f39c12; }

.auth-footer {
margin-top: 25px;
font-size: 14px;
}

.auth-footer a {
color: var(--primary-color);
text-decoration: none;
font-weight: 500;
}

/* APP CHÍNH - DASHBOARD */
.main-navbar {
background: white;
padding: 0 30px;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: var(--shadow-small);
position: fixed;
top: 0; left: 0; right: 0;
height: 60px;
z-index: 100;
}

.brand-name {
font-size: 22px;
font-weight: bold;
color: var(--sidebar-color);
}

.pro-tag {
background: var(--warning-color);
color: var(--sidebar-color);
font-size: 12px;
padding: 3px 6px;
border-radius: 4px;
position: relative;
top: -5px;
}

.role-badge {
background: var(--border-color);
color: var(--sidebar-color);
padding: 3px 8px;
border-radius: 10px;
font-size: 12px;
font-weight: bold;
margin-right: 15px;
}

.btn-logout-main {
background: #e16b5a;
border: none;
color: white;
padding: 8px 12px;
border-radius: 50%;
cursor: pointer;
}

.container-app {
display: flex;
margin-top: 60px;
min-height: calc(100vh - 60px);
}

.side-sidebar {
width: 250px;
background: var(--sidebar-color);
color: #ecf0f1;
display: flex;
flex-direction: column;
padding-top: 30px;
border-right: 1px solid #ddd;
}

.sidebar-menu {
list-style: none;
padding: 0;
flex: 1;
}

.sidebar-menu li {
padding: 15px 20px;
cursor: pointer;
transition: 0.2s;
font-weight: 500;
display: flex;
align-items: center;
}

.sidebar-menu li i { margin-right: 12px; width: 20px; text-align: center; }
.sidebar-menu li:hover {
background: #34495e;
border-left: 4px solid var(--primary-color);
}

.main-content {
flex: 1;
background: var(--bg-color);
padding: 30px;
}

.content-body {
background: white;
padding: 20px;
border-radius: 8px;
box-shadow: var(--shadow-small);
}

/* TABLE & BUTTONS */
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
border-radius: 8px;
overflow: hidden;
border: 1px solid var(--border-color);
}

th, td {
padding: 15px;
text-align: left;
border-bottom: 1px solid #eee;
}

th {
background: #f8f9fa;
color: var(--text-secondary);
font-weight: bold;
text-transform: uppercase;
font-size: 13px;
}

.btn-add, .btn-warning, .btn-delete, .btn-fav {
padding: 7px 12px;
border: none;
border-radius: 4px;
cursor: pointer;
font-weight: bold;
color: white;
}

.btn-add { background: var(--success-color); }
.btn-warning { background: var(--warning-color); }
.btn-delete { background: var(--danger-color); }
.btn-fav { background: var(--warning-color); color: var(--sidebar-color); }
.borrow-card {
max-width: 600px;
margin: 20px auto;
padding: 40px;
border: 2px solid #333;
background: #fff;
text-align: center;
box-shadow: 8px 8px 0px #ddd;
}

.borrow-card h2 {
font-size: 28px;
margin-bottom: 30px;
text-transform: uppercase;
}

.borrow-info-row {
display: flex;
justify-content: space-between;
margin-bottom: 15px;
font-size: 18px;
padding: 0 30px;
border-bottom: 1px dashed #ccc; 
padding-bottom: 10px;
}

.borrow-info-label { text-align: left; color: #555; }
.borrow-info-value { text-align: right; font-weight: bold; }

.borrow-note {
font-style: italic;
font-size: 14px;
margin: 30px 0;
color: #e74c3c;
}

.btn-confirm-borrow {
background: #2c3e50;
color: white;
border: none;
padding: 12px 40px;
font-size: 18px;
font-weight: bold;
cursor: pointer;
border-radius: 4px;
transition: 0.3s;
}

.btn-confirm-borrow:hover {
background: #34495e;
transform: scale(1.05);
}
.profile-card {
max-width: 800px;
margin: 20px auto;
padding: 30px;
background: #fff;
border: 2px solid #333;
position: relative;
}

.profile-title {
text-align: center;
font-size: 32px;
margin-bottom: 40px;
}

.profile-row {
display: flex;
align-items: center;
margin-bottom: 20px;
font-size: 18px;
}

.profile-label { width: 150px; text-align: left; }
.profile-value { flex: 1; font-weight: bold; font-size: 24px; }

.btn-edit-small {
background: #fff;
border: 2px solid #333;
padding: 5px 15px;
cursor: pointer;
box-shadow: 2px 2px 0px #333;
font-size: 14px;
}

.books-box {
border: 2px solid #333;
width: 300px;
height: 200px;
margin-left: 150px;
padding: 10px;
overflow-y: auto;
}

.btn-logout-wireframe {
float: right;
background: #fff;
border: 2px solid #333;
padding: 10px 20px;
cursor: pointer;
box-shadow: 3px 3px 0px #333;
margin-top: 20px;
}
.edit-name-card {
max-width: 600px;
margin: 50px auto;
padding: 40px;
border: 2px solid #333;
background: #fff;
text-align: center;
position: relative;
}

.edit-name-card h2 {
font-size: 32px;
margin-bottom: 40px;
font-weight: normal;
}

.edit-input-group {
display: flex;
align-items: center;
justify-content: center;
gap: 15px;
margin-bottom: 50px;
}

.edit-input-group input {
border: 2px solid #333;
padding: 8px;
width: 250px;
font-size: 18px;
}

.edit-btn-group {
display: flex;
justify-content: center;
gap: 80px;
}

.btn-wireframe {
background: #fff;
border: 2px solid #333;
padding: 10px 30px;
font-size: 18px;
cursor: pointer;
box-shadow: 4px 4px 0px #333; /* Đổ bóng khối theo wireframe */
transition: 0.1s;
}

.btn-wireframe:active {
box-shadow: 0px 0px 0px #333;
transform: translate(4px, 4px);
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th, .admin-table td {
    border: 1px solid #333; /* Viền đen đậm theo phong cách wireframe */
    padding: 12px;
    text-align: center;
}

.admin-table th {
    background-color: #f2f2f2;
}

.btn-admin-action {
    background: #fff;
    border: 1px solid #333;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    margin: 2px;
}

.btn-admin-action:hover {
    background: #eee;
}
/* CSS cho bảng thống kê Admin */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.admin-table th, .admin-table td {
    border: 2px solid #333; /* Viền đen rõ nét như hình vẽ */
    padding: 15px;
    text-align: center; /* Căn giữa nội dung các cột */
    font-size: 16px;
}

.admin-table th {
    background-color: #f2f2f2;
    text-transform: none; /* Giữ nguyên chữ Thường/Hoa như hình */
}