/* =========================================================
   LinfoxWeb - UI Custom Styles
   Chỉ phục vụ trang trí, không ảnh hưởng dữ liệu
   ========================================================= */

:root {
  --lf-primary: #2f6fed;
  --lf-primary-dark: #1f55c7;
  --lf-accent: #00bcd4;
  --lf-gradient: linear-gradient(135deg, #2f6fed 0%, #00bcd4 100%);
  --lf-sidebar-bg: linear-gradient(180deg, #1c2b45 0%, #142036 100%);
  --lf-radius: 12px;
  --lf-shadow: 0 10px 30px rgba(15, 34, 68, 0.12);
  --lf-shadow-lg: 0 20px 50px rgba(15, 34, 68, 0.22);
}

body {
  font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f4f6fb;
}

/* ---------- Sidebar ---------- */
.main-sidebar {
  background: var(--lf-sidebar-bg) !important;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.28);
}

.main-sidebar .sidebar {
  overflow-x: hidden;
  overflow-y: auto;
}

.main-sidebar .brand-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.main-sidebar .brand-link img {
  width: 78%;
  max-width: 210px;
  border-radius: 10px;
  transition: transform 0.25s ease;
}

.main-sidebar .brand-link img:hover {
  transform: scale(1.03);
}

.main-sidebar .nav-sidebar .nav-link {
  color: rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  margin: 3px 10px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  width: auto;
  max-width: 100%;
  overflow: hidden;
  transition: all 0.2s ease;
}

.main-sidebar .nav-sidebar .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(3px);
}

.main-sidebar .nav-sidebar .nav-link.active {
  color: #fff;
  background: var(--lf-gradient);
  box-shadow: 0 8px 20px rgba(47, 111, 237, 0.45);
}

.main-sidebar .nav-sidebar .nav-link p {
  font-weight: 500;
  margin-left: 6px;
  margin-bottom: 0;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.main-sidebar .nav-icon {
  width: 22px;
  flex: 0 0 22px;
  text-align: center;
  color: #8fb4ff;
}

.main-sidebar .nav-link.active .nav-icon {
  color: #fff;
}

/* ---------- Navbar / Header ---------- */
.main-header {
  background: #fff !important;
  border-bottom: 1px solid #e9edf5;
  box-shadow: 0 2px 14px rgba(15, 34, 68, 0.06);
}

.main-header .nav-link {
  color: #4b587c !important;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.main-header .nav-link:hover {
  background: #f1f4fb;
  color: #1c2b45 !important;
}

.main-header .navbar-nav .nav-link[data-widget="pushmenu"] {
  background: transparent !important;
  color: #2f6fed !important;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 6px 0 4px;
}

.main-header .navbar-nav .nav-link[data-widget="pushmenu"]:hover {
  background: #eef3ff !important;
}

.lf-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f1f4fb;
  margin-left: 8px;
}

.lf-user-chip .avatar-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--lf-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(47, 111, 237, 0.4);
}

.lf-user-chip .avatar-name {
  font-weight: 600;
  color: #1c2b45;
  font-size: 14px;
}

/* ---------- Content wrapper & cards ---------- */
.content-wrapper {
  background: #f4f6fb;
}

.content-header {
  padding: 1.25rem 1.5rem;
}

.content-header h1 {
  font-weight: 700;
  color: #1c2b45;
  font-size: 1.6rem;
  margin: 0;
}

.content {
  padding: 0 1.5rem 1.5rem;
}

.card {
  border: none;
  border-radius: var(--lf-radius);
  box-shadow: var(--lf-shadow);
  overflow: hidden;
}

.card .card-header {
  background: #fff;
  border-bottom: 1px solid #edf0f7;
  padding: 1rem 1.25rem;
}

.card .card-title {
  font-weight: 700;
  color: #1c2b45;
}

.card .card-title .lf-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--lf-gradient);
  color: #fff;
  margin-right: 10px;
  font-size: 15px;
}

/* ---------- Buttons ---------- */
.btn-lf-primary {
  background: var(--lf-gradient);
  border: none;
  color: #fff !important;
  border-radius: 10px;
  padding: 8px 18px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(47, 111, 237, 0.35);
  transition: all 0.2s ease;
}

.btn-lf-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(47, 111, 237, 0.45);
  color: #fff;
}

.btn-lf-secondary {
  background: #eef3ff;
  border: none;
  color: #2f6fed !important;
  border-radius: 10px;
  padding: 8px 18px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-lf-secondary:hover {
  background: #dfe8ff;
  color: #1f55c7 !important;
}

.btn-lf-light {
  background: #fff;
  border: 1px solid #e5eaf3;
  color: #4b587c !important;
  border-radius: 10px;
  padding: 8px 18px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-lf-light:hover {
  background: #f6f8fc;
  color: #1c2b45 !important;
}

/* ---------- Tables ---------- */
.table thead th {
  background: #f7f9fd;
  color: #42526e;
  font-weight: 700;
  border-bottom: 2px solid #e6ebf5;
  white-space: nowrap;
  vertical-align: middle;
}

.table.table-hover tbody tr:hover {
  background: #f4f8ff;
}

.table td {
  vertical-align: middle;
}

/* Status badges (dots -> nicer pills) */
.lf-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f1f4fb;
  color: #42526e;
}

.lf-status .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.07);
}

.lf-status .dot.green { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18), 0 0 8px rgba(34, 197, 94, 0.6); }
.lf-status .dot.red { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18), 0 0 8px rgba(239, 68, 68, 0.6); }
.lf-status .dot.yellow, .lf-status .dot.orange { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18), 0 0 8px rgba(245, 158, 11, 0.6); }
.lf-status .dot.gray, .lf-status .dot.grey { background: #9ca3af; box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.18); }

/* ---------- Modals ---------- */
.modal-content {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--lf-shadow-lg);
}

.modal-header {
  background: var(--lf-gradient);
  color: #fff;
  border-bottom: none;
  padding: 1rem 1.5rem;
}

.modal-header .modal-title {
  font-weight: 700;
  color: #fff;
}

.modal-header .close {
  color: #fff;
  opacity: 0.9;
  text-shadow: none;
}

.modal-header .close:hover {
  opacity: 1;
  color: #fff;
}

.modal-body {
  padding: 1.5rem;
}

.modal-body .card {
  box-shadow: none;
  border: none;
  background: #fafbfe;
}

.modal-footer {
  border-top: 1px solid #edf0f7;
  padding: 1rem 1.5rem;
}

/* ---------- Forms ---------- */
.form-control, .form-select {
  border-radius: 10px;
  border: 1px solid #dfe5ef;
  padding: 9px 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-control:focus, .form-select:focus {
  border-color: #2f6fed;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.14);
}

.col-form-label {
  font-weight: 600;
  color: #42526e;
}

/* ---------- Login page ---------- */
body.lf-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1c2b45 0%, #2f6fed 55%, #00bcd4 100%);
  background-attachment: fixed;
}

.lf-login .login-box {
  width: 400px;
  max-width: 92%;
}

.lf-login .login-logo img {
  width: 85%;
  max-width: 230px;
  margin: 0 auto 14px;
  display: block;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
}

.lf-login .login-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  padding: 30px 28px;
}

.lf-login .login-card .login-title {
  font-weight: 700;
  color: #1c2b45;
  text-align: center;
  margin-bottom: 6px;
}

.lf-login .login-card .login-subtitle {
  text-align: center;
  color: #8a94a6;
  font-size: 14px;
  margin-bottom: 22px;
}

.lf-login .input-group-text {
  background: #f7f9fd;
  border: 1px solid #dfe5ef;
  color: #2f6fed;
  border-radius: 10px 0 0 10px;
}

.lf-login .form-control {
  border-left: none !important;
}

.lf-login .lf-error {
  display: block;
  text-align: center;
  margin: 6px 0 14px;
  font-weight: 600;
  color: #ef4444;
}

.lf-login .btn-login {
  width: 100%;
  background: var(--lf-gradient);
  border: none;
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
  padding: 11px;
  box-shadow: 0 12px 28px rgba(47, 111, 237, 0.45);
  transition: all 0.2s ease;
}

.lf-login .btn-login:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  color: #fff;
}

/* ---------- Footer ---------- */
.lf-footer {
  padding: 16px 24px;
  text-align: center;
  color: #8a94a6;
  font-size: 13px;
  background: #fff;
  border-top: 1px solid #edf0f7;
}

.lf-footer a {
  color: #2f6fed;
  font-weight: 600;
}

/* ---------- Role badge & permission note ---------- */
.lf-role-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
}

.lf-permission-note {
  background: #f7f9fd;
  border: 1px dashed #d7dfee;
  border-radius: 10px;
  padding: 12px 16px 12px 32px;
  color: #42526e;
  font-size: 13px;
}

.lf-permission-note ul {
  margin: 0;
  padding-left: 16px;
  list-style-type: disc;
}

/* ---------- Report helpers ---------- */
.chart-box {
  background: #fafbfe;
  border: 1px solid #edf0f7;
  border-radius: 12px;
  padding: 16px;
  height: 100%;
}

.lf-report-period {
  color: #2f6fed;
  font-size: 15px;
}

/* ---------- Display panels (kept compatible) ---------- */
.successPanel h1 { color: #22c55e; }
.failPanel h1 { color: #ef4444; }

.holderPanel {
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

/* ---------- Responsive refinements ---------- */
@media (max-width: 768px) {
  .content-header h1 { font-size: 1.3rem; }
  .content { padding: 0 0.9rem 1rem; }
  .lf-user-chip .avatar-name { display: none; }
}