@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

:root {
  --bg-body: #f3f2f1;
  --surface: #ffffff;
  --primary: #0066cc;
  --primary-hover: #0052a3;
  --text-main: #323130;
  --text-muted: #605e5c;
  --border: #edebe9;
  --hover-bg: #f3f2f1;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  margin: 0;
  overflow: hidden;
  height: 100vh;
}

/* --- Layout --- */
.app-layout { display: flex; height: 100vh; }
.sidebar { width: 260px; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.main-content { flex: 1; display: flex; flex-direction: column; background: var(--surface); overflow: hidden; }

/* --- Sidebar --- */
.sidebar-header { padding: 1.5rem 1rem 1rem; }
.brand-logo { font-size: 1.25rem; font-weight: 600; color: var(--primary); text-decoration: none; display: flex; align-items: center; gap: 8px; margin-bottom: 1.5rem; }
.btn-create { background: var(--primary); color: white; border: none; border-radius: 24px; padding: 10px 16px; font-weight: 500; width: 100%; display: flex; align-items: center; gap: 8px; justify-content: center; transition: background 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.btn-create:hover { background: var(--primary-hover); }
.sidebar-nav { flex: 1; padding: 0 0.5rem; }
.nav-item { display: flex; align-items: center; padding: 10px 12px; color: var(--text-main); text-decoration: none; border-radius: 6px; font-size: 0.95rem; margin-bottom: 2px; transition: background 0.2s; }
.nav-item i { width: 24px; text-align: center; margin-right: 8px; color: var(--text-muted); font-size: 1.1rem; }
.nav-item:hover { background: var(--hover-bg); }
.nav-item.active { background: #e5f1fb; color: var(--primary); font-weight: 600; }
.nav-item.active i { color: var(--primary); }
.nav-divider { height: 1px; background: var(--border); margin: 8px 12px; }
.sidebar-footer { padding: 1rem; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; background: #e5f1fb; color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.9rem; }
.user-info { display: flex; flex-direction: column; line-height: 1.2; flex: 1; }
.user-name { font-weight: 600; font-size: 0.9rem; }
.user-alias { color: var(--text-muted); font-size: 0.8rem; }
.logout-btn { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.logout-btn:hover { color: #d13438; }

/* --- Top Bar --- */
.top-bar { padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; }
.page-title { font-size: 1.5rem; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 12px; }
.page-title i { color: var(--primary); }
.search-bar { display: flex; align-items: center; background: var(--bg-body); border-radius: 20px; padding: 8px 16px; width: 350px; border: 1px solid transparent; }
.search-bar:focus-within { border-color: var(--primary); background: var(--surface); }
.search-bar input { border: none; background: transparent; outline: none; width: 100%; margin-left: 8px; font-size: 0.95rem; }

/* --- Main Content (Table) --- */
.content-area { flex: 1; overflow-y: auto; padding: 0 2rem 2rem; }
.breadcrumb { font-size: 0.9rem; }
.breadcrumb-item a { color: var(--text-muted); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }

.table-od { width: 100%; border-collapse: collapse; }
.table-od th { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); padding: 12px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.table-od td { padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table-od tbody tr { transition: background 0.1s; }
.table-od tbody tr:hover { background: var(--hover-bg); }
.table-od a { color: var(--text-main); text-decoration: none; }
.table-od a:hover { text-decoration: underline; color: var(--primary); }

/* Cột Actions: Chỉ hiện khi hover vào dòng */
.action-btns { opacity: 0; transition: opacity 0.2s; display: flex; justify-content: flex-end; gap: 4px; }
.table-od tbody tr:hover .action-btns { opacity: 1; }
.btn-icon { width: 32px; height: 32px; border-radius: 4px; border: none; background: transparent; color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; transition: background 0.2s, color 0.2s; cursor: pointer; text-decoration: none; }
.btn-icon:hover { background: #e1dfdd; color: var(--text-main); }
.btn-icon.text-danger:hover { background: #fde7e9; color: #d13438; }

/* Icon File Colors */
.fa-file-pdf { color: #d13438; }
.fa-file-excel { color: #107c10; }
.fa-file-word { color: #0078d4; }
.fa-file-image { color: #8764b8; }
.fa-folder { color: #ffb900; }

/* Badges */
.badge-folder { background: #f3f2f1; color: #605e5c; font-weight: 500; }
.badge-public { background: #dff6dd; color: #107c10; }
.badge-private { background: #f3f2f1; color: #605e5c; }

/* Responsive */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .search-bar { width: 200px; }
}