Legalmind / static /style_admin.css
Nguyendat92929's picture
Upload style_admin.css
5648682 verified
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
:root {
/* Màu sắc lấy từ ảnh */
--sidebar-bg: #1e293b;
--sidebar-text: #adb5bd;
--sidebar-active-bg: #2563eb;
--sidebar-active-border: #4d80e4;
--topbar-bg: #0f172a;
--text-dark: #343a40;
--body-bg-change: #3b4b61;
--text-light: #ffffff;
--body-bg: #f8f9fa;
--card-bg: #ffffff;
--border-color: #dee2e6;
--shadow-light: rgba(0, 0, 0, 0.05);
--table-header-bg: #f1f3f5;
--table-row-hover: #fcfcfc;
--blue-primary: #4d80e4;
--green-unlimited: #28a745;
--yellow-limited: #ffc107;
--red-delete: #dc3545;
--orange-reset: #fd7e14;
--body-bgs: #334155;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
/* Sửa lỗi font-family ở đây */
font-family: 'ui-sans-serif', 'system-ui', 'sans-serif', "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}
body {
display: flex;
min-height: 100vh;
background-color: var(--body-bg);
color: var(--text-dark);
font-size: 14px;
}
/* Sidebar */
.sidebar {
width: 260px;
background-color: var(--sidebar-bg);
color: var(--sidebar-text);
padding: 25px 0 20px;
display: flex;
flex-direction: column;
box-shadow: 2px 0 8px var(--shadow-light);
flex-shrink: 0;
transition: transform 0.3s ease-in-out, width 0.3s ease-in-out;
}
.sidebar-header {
padding: 0 25px 10px;
font-size: 20px;
font-weight: 700;
color: var(--text-light);
}
.sidebar-nav ul {
list-style: none;
}
.sidebar-nav li {
margin-bottom: 2px;
}
.sidebar-nav a {
display: flex;
align-items: center;
padding: 12px 25px;
color: var(--sidebar-text);
text-decoration: none;
transition: background-color 0.2s ease, color 0.2s ease;
font-size: 15px;
font-weight: 500;
}
.sidebar-nav a i {
margin-right: 12px;
font-size: 18px;
}
.sidebar-nav a:hover {
background-color: rgba(255, 255, 255, 0.05);
color: var(--text-light);
}
.sidebar-nav a.active {
background-color: var(--sidebar-active-bg);
color: var(--text-light);
border-left: 4px solid var(--sidebar-active-border);
padding-left: 21px;
}
/* Main content */
.main-content {
flex-grow: 1;
display: flex;
flex-direction: column;
transition: margin-left 0.3s ease-in-out;
}
/* Top Bar */
.top-bar {
background-color: var(--topbar-bg);
padding: 15px 30px;
display: flex;
justify-content: flex-end;
align-items: center;
box-shadow: 0 1px 3px var(--shadow-light);
border-bottom: 1px solid var(--border-color);
}
.top-bar .menu-toggle {
display: none;
background: none;
border: none;
font-size: 20px;
color: var(--text-light);
cursor: pointer;
margin-right: auto;
}
.top-bar span {
margin-right: 20px;
font-weight: 500;
color: var(--text-light);
font-size: 14px;
}
.top-bar button {
background-color: var(--body-bgs);
color: var(--text-light);
border: 1px solid var(--body-bgs);
padding: 8px 12px;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
display: flex;
align-items: center;
font-weight: 500;
transition: background-color 0.2s ease;
}
.top-bar button i {
margin-right: 8px;
}
.top-bar button:hover {
background-color: var(--body-bg-change);
}
/* Content Area */
.content-area {
flex-grow: 1;
padding: 30px;
background-color: var(--body-bg);
}
.content-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 25px;
flex-wrap: wrap;
}
.content-header h1 {
font-size: 24px;
color: var(--text-dark);
font-weight: 600;
margin-bottom: 0;
}
.add-new-btn {
background-color: var(--blue-primary);
color: var(--text-light);
border: none;
padding: 10px 18px;
border-radius: 8px;
cursor: pointer;
font-size: 14px;
display: flex;
align-items: center;
font-weight: 500;
transition: background-color 0.2s ease;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.add-new-btn:hover {
background-color: #3b6ed3;
}
.add-new-btn i {
margin-right: 8px;
font-size: 16px;
}
.search-bar {
margin-bottom: 25px;
position: relative;
}
.search-bar input {
width: 100%;
padding: 10px 15px 10px 40px;
border: 1px solid #ced4da;
border-radius: 8px;
font-size: 15px;
outline: none;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-bar input::placeholder {
color: #6c757d;
}
.search-bar input:focus {
border-color: var(--blue-primary);
box-shadow: 0 0 0 0.2rem rgba(77, 128, 228, 0.25);
}
.search-bar i {
position: absolute;
left: 15px;
top: 50%;
transform: translateY(-50%);
color: #6c757d;
font-size: 16px;
}
/* Responsive Table Wrapper */
.user-table-responsive {
width: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
/* Table Container */
.user-table {
background-color: var(--card-bg);
border-radius: 8px;
box-shadow: 0 2px 5px var(--shadow-light);
overflow: hidden;
min-width: 0;
}
/* Table */
.user-table table {
width: 100%;
border-collapse: collapse;
table-layout: auto;
}
/* Table Cells */
.user-table th,
.user-table td {
text-align: left;
padding: 15px 20px;
border-bottom: 1px solid var(--border-color);
font-size: 14px;
vertical-align: middle;
white-space: nowrap;
}
/* Specific column widths */
.user-table th:nth-child(1),
.user-table td:nth-child(1) {
/* ID */
width: 10%;
}
.user-table th:nth-child(2),
.user-table td:nth-child(2) {
/* Username */
width: 20%;
}
.user-table th:nth-child(3),
.user-table td:nth-child(3) {
/* Email */
width: 25%;
}
.user-table th:nth-child(4),
.user-table td:nth-child(4) {
/* Phone */
width: 15%;
}
.user-table th:nth-child(5),
.user-table td:nth-child(5) {
/* Account Type */
width: 15%;
}
.user-table th:nth-child(6),
.user-table td:nth-child(6) {
/* Query Count */
width: 15%;
}
.user-table th:nth-child(7),
.user-table td:nth-child(7) {
/* Actions */
width: 20%;
}
.user-table th {
background-color: var(--table-header-bg);
font-weight: 600;
color: var(--text-dark);
text-transform: uppercase;
font-size: 12px;
letter-spacing: 0.5px;
position: sticky;
top: 0;
z-index: 1;
}
.user-table tbody tr:last-child td {
border-bottom: none;
}
.user-table tbody tr:hover {
background-color: var(--table-row-hover);
}
.status-badge {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 6px 10px;
border-radius: 5px;
font-size: 12px;
font-weight: 600;
line-height: 1;
}
.status-badge.limit {
background-color: var(--yellow-limited);
color: #555;
}
.status-badge.unlimited {
background-color: var(--green-unlimited);
color: var(--text-light);
}
.action-buttons {
display: flex;
gap: 8px;
flex-wrap: nowrap;
}
.action-buttons button {
background: none;
border: 1px solid;
cursor: pointer;
font-size: 14px;
padding: 10px 10px;
border-radius: 5px;
display: flex;
align-items: center;
transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
font-weight: 500;
flex-shrink: 0;
}
.action-buttons button i {
font-size: 13px;
}
.action-buttons .edit-btn {
color: var(--blue-primary);
border-color: var(--blue-primary);
border-radius: 100%;
}
.action-buttons .edit-btn:hover {
background-color: var(--blue-primary);
color: var(--text-light);
border-radius: 100%;
}
.action-buttons .delete-btn {
color: var(--red-delete);
border-color: var(--red-delete);
border-radius: 100%;
}
.action-buttons .delete-btn:hover {
background-color: var(--red-delete);
color: var(--text-light);
}
.action-buttons .reset-btn {
color: var(--orange-reset);
border-color: var(--orange-reset);
border-radius: 100%;
}
.action-buttons .reset-btn:hover {
background-color: var(--orange-reset);
color: var(--text-light);
}
/* Responsive Styles */
@media (max-width: 768px) {
body {
flex-direction: column;
}
.sidebar {
position: fixed;
top: 0;
left: 0;
height: 100%;
z-index: 1000;
transform: translateX(-100%);
box-shadow: 3px 0 8px rgba(0, 0, 0, 0.2);
width: 250px;
}
.sidebar.active {
transform: translateX(0);
}
.main-content {
margin-left: 0;
}
.top-bar {
justify-content: space-between;
padding: 15px 20px;
}
.top-bar .menu-toggle {
display: block;
}
.top-bar span {
margin-right: auto;
margin-left: 10px;
}
.content-area {
padding: 20px;
}
.content-header {
flex-direction: column;
align-items: flex-start;
margin-bottom: 20px;
}
.content-header h1 {
margin-bottom: 15px;
font-size: 22px;
}
.add-new-btn {
width: 100%;
justify-content: center;
padding: 12px 18px;
}
.search-bar input {
font-size: 14px;
}
.user-table-responsive {
overflow-x: auto;
}
.user-table table {
display: block;
width: 100%;
min-width: unset;
}
.user-table thead {
display: none;
}
.user-table tbody,
.user-table tr {
display: block;
}
.user-table tr {
margin-bottom: 20px;
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 10px;
background-color: var(--card-bg);
}
.user-table td {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 15px;
border-bottom: none;
text-align: right;
}
.user-table td:before {
content: attr(data-label);
font-weight: 600;
color: var(--text-dark);
text-transform: uppercase;
font-size: 12px;
flex: 1;
text-align: left;
}
.user-table td:nth-child(1),
.user-table td:nth-child(4) {
display: none;
}
.action-buttons {
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
gap: 10px;
}
.action-buttons button {
width: auto;
min-width: 120px;
}
}
@media (min-width: 769px) and (max-width: 1024px) {
.sidebar {
width: 220px;
}
.sidebar-header {
font-size: 18px;
}
.sidebar-nav a {
font-size: 14px;
padding: 10px 20px;
}
.sidebar-nav a i {
font-size: 16px;
}
.content-area {
padding: 25px;
}
.content-header h1 {
font-size: 22px;
}
.add-new-btn {
padding: 9px 16px;
font-size: 13px;
}
.user-table th,
.user-table td {
padding: 12px 18px;
font-size: 13.5px;
}
}
ol,
ul {
padding-left: 0rem !important;
}
/* Custom badge styling */
.badge {
display: inline-block;
padding: 0.25em 0.4em;
font-size: 75%;
font-weight: 700;
line-height: 1;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: 0.25rem;
}
/* Pill-shaped badge */
.badge-pill {
border-radius: 10rem;
}
/* Warning badge (for limited account) */
.badge-warning {
color: #c0a167;
background-color: #fef9c3; /* Yellow/orange background */
}
/* Success badge (for other accounts) */
.badge-success {
color: #4e9067;
background-color: #dcfce7; /* Green background */
}