/* HLT云盘 — presentation layer for the existing SFTPGo 2.7.6 UI. */
:root, [data-bs-theme="light"] {
  --hd-canvas: #f6f8fc;
  --hd-surface: #ffffff;
  --hd-ink: #18243b;
  --hd-muted: #7b879b;
  --hd-line: #e9edf5;
  --hd-soft: #f1f5ff;
  --hd-primary: #4667e9;
  --bs-primary: #4667e9;
  --bs-primary-rgb: 70, 103, 233;
  --bs-primary-active: #3654cd;
  --bs-primary-light: #eef2ff;
  --bs-body-bg: #f6f8fc;
  --bs-body-color: #18243b;
  --bs-app-sidebar-width: 244px;
  --bs-app-sidebar-width-actual: 244px;
  --bs-app-header-height: 76px;
  --bs-app-header-height-actual: 76px;
}

[data-bs-theme="dark"] {
  --hd-canvas: #111724;
  --hd-surface: #192133;
  --hd-ink: #e9eefb;
  --hd-muted: #98a6c0;
  --hd-line: #2b354b;
  --hd-soft: #252f4b;
  --hd-primary: #91a6ff;
  --bs-body-bg: #111724;
  --bs-body-color: #e9eefb;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--hd-ink);
  -webkit-font-smoothing: antialiased;
  background: var(--hd-canvas) !important;
}

button, input, select, textarea { font-family: inherit; }
a { text-underline-offset: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #9aafff !important;
  outline-offset: 3px;
}

/* A quiet navigation rail, rather than a full-height black block. */
#kt_app_sidebar {
  background: var(--hd-surface) !important;
  border-right: 1px solid var(--hd-line);
  box-shadow: none !important;
}
#kt_app_sidebar_header { margin: 0 !important; padding: 29px 25px 21px !important; }
#kt_app_sidebar_header > .d-flex { margin-bottom: 20px !important; }
.app-sidebar-logo { display: flex; align-items: center; gap: 11px; }
.app-sidebar-logo img { width: 38px; height: 38px !important; }
.app-sidebar-logo .text-sidebar {
  font-size: 17px !important;
  font-weight: 750 !important;
  padding-left: 0 !important;
  color: var(--hd-ink) !important;
  letter-spacing: -.5px;
}
#kt_app_sidebar_header::after {
  content: "PERSONAL WORKSPACE";
  display: block;
  color: var(--hd-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.7px;
  margin-top: 26px;
}
#kt_app_sidebar_navs_wrappers { margin: 0 14px !important; }
.app-sidebar .menu-item { margin-bottom: 5px; }
.app-sidebar .menu-link {
  min-height: 46px;
  padding: 11px 15px !important;
  border-radius: 11px !important;
  color: var(--hd-muted) !important;
  font-size: 14px;
}
.app-sidebar .menu-title, .app-sidebar .menu-icon i { color: inherit !important; }
.app-sidebar .menu-icon { width: 27px; margin-right: 8px; }
.app-sidebar .menu-icon > i { font-size: 21px !important; }
.app-sidebar .menu-link.active {
  color: var(--hd-primary) !important;
  background: var(--hd-soft) !important;
  font-weight: 700;
}
.app-sidebar .menu-link:hover { background: var(--hd-canvas) !important; color: var(--hd-ink) !important; }
.app-sidebar .menu-link.active:hover { color: var(--hd-primary) !important; background: var(--hd-soft) !important; }
.app-header { background: var(--hd-surface) !important; border-bottom: 1px solid var(--hd-line); box-shadow: none !important; }
#kt_app_header_container { padding-left: 38px !important; padding-right: 38px !important; }
.hd-topbar-name { font-size: 13px; font-weight: 650; letter-spacing: -.1px; }
.hd-topbar-name span { color: var(--hd-muted); margin-left: 11px; font-weight: 400; }
.app-navbar .btn-icon { border-radius: 11px !important; color: var(--hd-muted); }
.app-navbar .btn-icon:hover { background: var(--hd-soft) !important; }
#kt_app_content { padding: 34px 0 18px !important; }
#kt_app_content_container { max-width: 1440px; padding: 0 38px !important; }
#kt_app_footer { color: var(--hd-muted); font-size: 11px; opacity: .76; padding-bottom: 12px; }
#kt_app_footer .text-gray-700 { color: var(--hd-muted) !important; font-weight: 400 !important; }

.hd-page-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 27px; }
.hd-eyebrow { color: var(--hd-muted); font-size: 10px; font-weight: 750; letter-spacing: 2.2px; margin: 0 0 9px; }
.hd-page-heading h1 { font-size: 29px; line-height: 1.25; color: var(--hd-ink); font-weight: 750; letter-spacing: -.8px; margin: 0; }
.hd-page-heading p.hd-subtitle { color: var(--hd-muted); margin: 10px 0 0; font-size: 13px; }
.hd-private-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 30px; border: 1px solid var(--hd-line); background: var(--hd-surface); color: var(--hd-muted); font-size: 12px; white-space: nowrap; }
.hd-status-dot { width: 6px; height: 6px; border-radius: 50%; background: #43b990; box-shadow: 0 0 0 4px #43b99014; }
.card { border: 1px solid var(--hd-line) !important; border-radius: 17px !important; background: var(--hd-surface) !important; box-shadow: 0 3px 14px #1e325503 !important; }
.card .card-header { border-bottom-color: var(--hd-line); border-radius: 17px 17px 0 0; }
.card-header.bg-light { background: var(--hd-surface) !important; }
#kt_app_content_container > .card.card-flush > .card-header { padding: 22px 25px 17px !important; min-height: 0; }
#kt_app_content_container > .card.card-flush > .card-body { padding: 7px 25px 20px !important; }
.form-control, .form-select { border-radius: 10px !important; border-color: var(--hd-line); color: var(--hd-ink); }
.form-control:focus, .form-select:focus { border-color: #9caff7 !important; box-shadow: 0 0 0 4px #4667e90c !important; }
input[data-kt-filemanager-table-filter="search"] { width: 272px !important; min-height: 41px; padding-top: 9px; padding-bottom: 9px; font-size: 13px; background: var(--hd-canvas); border: 1px solid transparent; }
input::placeholder { color: var(--hd-muted) !important; }
.btn { border-radius: 10px !important; font-size: 13px; font-weight: 650; transition: background .15s ease, box-shadow .15s ease, transform .15s ease; }
.btn-primary { background: #4667e9 !important; border-color: #4667e9 !important; color: #fff !important; box-shadow: 0 3px 8px #4667e91c; }
.btn-primary:hover { background: #3654cd !important; border-color: #3654cd !important; box-shadow: 0 4px 12px #4667e92a; }
.btn-light-primary { background: var(--hd-surface) !important; border: 1px solid var(--hd-line) !important; color: var(--hd-ink) !important; }
.btn-light-primary:hover { background: var(--hd-soft) !important; color: var(--hd-primary) !important; border-color: #4667e925 !important; }
.btn-light-primary i { color: var(--hd-muted) !important; }
.card-toolbar .btn { padding: 11px 16px !important; min-height: 42px; }
.card-toolbar .btn > i { font-size: 18px !important; margin-right: 7px; }
.badge[data-kt-filemanager-table-nav-bar] { margin: 5px 0 17px; background: transparent !important; padding: 7px 0 !important; color: var(--hd-muted); }
.badge[data-kt-filemanager-table-nav-bar] a { color: var(--hd-muted); font-size: 12px; font-weight: 500; }
.badge[data-kt-filemanager-table-nav-bar] i { font-size: 18px !important; color: #9ba8be !important; }
.table { color: var(--hd-ink); font-size: 13px; }
#file_manager_list_container { overflow-x: auto; max-width: 100%; }
.table thead tr { background: var(--hd-canvas); }
.table thead th { padding: 12px 12px !important; color: var(--hd-muted) !important; font-size: 11px; font-weight: 600 !important; border: 0 !important; white-space: nowrap; }
.table thead th:first-child { border-radius: 8px 0 0 8px; }
.table thead th:last-child { border-radius: 0 8px 8px 0; }
.table tbody td { padding: 17px 12px !important; border-bottom: 1px solid var(--hd-line) !important; vertical-align: middle; color: var(--hd-muted); }
.table tbody tr:last-child td { border-bottom: 0 !important; }
.table tbody tr:hover { background: var(--hd-canvas) !important; }
.table tbody td a.text-gray-800 { font-size: 13px; font-weight: 550; color: var(--hd-ink) !important; word-break: break-word; }
.table tbody td a.text-gray-800:hover { color: var(--hd-primary) !important; }
.table .form-check-input { width: 16px; height: 16px; border-radius: 5px !important; background-color: transparent; border: 1.5px solid #dbe2ed !important; }
.table .form-check-input:checked { background-color: #4667e9 !important; border-color: #4667e9 !important; }
.table td:first-child, .table th:first-child { padding-left: 14px !important; }
.table td:last-child { white-space: nowrap; }
.hd-file-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 35px; height: 41px; border-radius: 9px; background: #eef2ff; color: #6380ec; margin-right: 12px; }
.hd-file-icon svg { width: 21px; height: 24px; }
.hd-file-icon.is-image { color: #a180df; background: #f2edfb; }
.hd-file-icon.is-folder { color: #d5a74c; background: #fff6df; }
.hd-file-icon.is-pdf { color: #d67c78; background: #fff0ee; }
.hd-direct-download { display: inline-flex; gap: 5px; align-items: center; color: var(--hd-primary) !important; font-size: 12px; font-weight: 600; padding: 7px 10px; border-radius: 8px; margin-left: 6px; text-decoration: none; }
.hd-direct-download:hover { background: var(--hd-soft); }
.hd-direct-download svg { width: 15px; height: 15px; }
.table .btn-icon.btn-sm { width: 31px !important; height: 31px !important; background: transparent !important; color: var(--hd-muted) !important; }
.table .btn-icon.btn-sm:hover { background: var(--hd-soft) !important; }
.table .btn-icon i { color: var(--hd-muted) !important; }
div.dataTables_wrapper div.dataTables_info { font-size: 11px; color: var(--hd-muted) !important; }
div.dataTables_wrapper .dataTables_length select { font-size: 11px; padding: 6px 22px 6px 10px; min-height: 30px; background-color: var(--hd-canvas); border-color: transparent; }
.pagination .page-item .page-link { border-radius: 8px !important; min-width: 30px; height: 30px; font-size: 12px; }
.pagination .page-item.active .page-link { background: var(--hd-soft) !important; color: var(--hd-primary) !important; }
.menu-sub-dropdown { border: 1px solid var(--hd-line); border-radius: 12px !important; background: var(--hd-surface) !important; box-shadow: 0 10px 35px #172e5b12; }
.menu-sub-dropdown .menu-link { border-radius: 7px; font-size: 13px; }
.modal-content { border-radius: 18px !important; border: 1px solid var(--hd-line); background: var(--hd-surface); }
.modal-header { border-bottom-color: var(--hd-line); }
.modal-footer { border-top-color: var(--hd-line); }
.dropzone { border-radius: 12px !important; border: 1.5px dashed #a5b6f3 !important; background: var(--hd-soft) !important; }

/* The login form keeps the native SFTPGo POST, CSRF token and 2FA flow. */
.app-blank { background: #f5f7fc !important; }
.hd-login-layout { display: grid !important; grid-template-columns: minmax(0, 1fr) 420px; gap: 85px; width: min(1080px, calc(100% - 80px)); padding: 54px 0 !important; margin: 0 auto; align-items: center; min-height: 100vh; }
.hd-login-story { padding: 15px 0; align-self: center; }
.hd-login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 53px; font-size: 18px; font-weight: 750; letter-spacing: -.5px; color: #1b2943; }
.hd-login-brand img { width: 42px; height: 42px; }
.hd-login-story h2 { font-size: 43px; letter-spacing: -1.9px; font-weight: 750; line-height: 1.4; color: #1b2943; margin: 0 0 19px; }
.hd-login-story h2 em { font-style: normal; color: #526fe2; }
.hd-login-story > p { max-width: 370px; font-size: 14px; line-height: 1.9; color: #8490a5; }
.hd-login-illustration { position: relative; margin-top: 42px; height: 179px; max-width: 390px; }
.hd-paper { position: absolute; background: #fff; border: 1px solid #e9edf5; border-radius: 13px; box-shadow: 0 10px 35px #253b6210; width: 178px; height: 115px; padding: 18px; transform: rotate(-7deg); left: 5px; top: 28px; }
.hd-paper:nth-child(2) { transform: rotate(6deg); left: 158px; top: 0; background: #eff2ff; border-color: #e1e7fb; }
.hd-paper-icon { display: flex; width: 32px; height: 35px; border-radius: 7px; background: #eef2ff; align-items: center; justify-content: center; color: #6c84dd; }
.hd-paper:nth-child(2) .hd-paper-icon { background: #fff; color: #b39bd9; }
.hd-paper-icon svg { width: 20px; height: 20px; }
.hd-paper-line { width: 85%; height: 5px; border-radius: 5px; background: #edf0f6; margin-top: 12px; }
.hd-paper-line:last-child { width: 55%; margin-top: 6px; }
.hd-paper:nth-child(2) .hd-paper-line { background: #dde4f9; }
.hd-login-security { display: inline-flex; align-items: center; gap: 7px; color: #91a0b8; font-size: 11px; margin-top: 8px; }
.hd-login-security svg { width: 14px; height: 14px; }
.hd-login-card { width: 420px !important; padding: 38px 36px 28px !important; border: 1px solid #e7ebf4; border-radius: 21px !important; background: #fff !important; box-shadow: 0 12px 44px #23375a07 !important; }
.hd-signin-heading { margin-bottom: 30px; }
.hd-signin-heading h1 { margin: 0 0 9px; font-size: 24px; font-weight: 750; letter-spacing: -.6px; color: #202d46; }
.hd-signin-heading p:not(.hd-eyebrow) { font-size: 12px; color: #8a96a9; margin: 0; }
.hd-login-card label.hd-input-label { color: #65728a; font-size: 12px; font-weight: 600; display: block; margin-bottom: 9px; }
.hd-login-card .fv-row { margin-bottom: 21px !important; }
.hd-login-card .form-control { min-height: 46px; padding: 12px 14px; border: 1px solid #e7ebf3; background: #fafbfe; font-size: 13px; color: #202d46; }
.hd-login-card #sign_in_submit { min-height: 46px; font-size: 13px; font-weight: 650; margin-top: 8px; margin-bottom: 12px !important; }
.hd-login-card hr { border-color: #e7ebf3; opacity: 1; margin-top: 16px; }
.hd-login-card a { font-size: 11px; color: #8692a6; }
.hd-login-card .form-select { font-size: 11px; }
[data-bs-theme="dark"] .hd-login-card { background: var(--hd-surface) !important; border-color: var(--hd-line); }
[data-bs-theme="dark"] .hd-signin-heading h1 { color: var(--hd-ink); }
[data-bs-theme="dark"] .hd-login-card .form-control { background: var(--hd-canvas); color: var(--hd-ink); border-color: var(--hd-line); }

@media (min-width: 992px) {
  :root, body { --bs-app-sidebar-width: 244px; --bs-app-sidebar-width-actual: 244px; --bs-app-header-height: 76px; --bs-app-header-height-actual: 76px; }
}
@media (max-width: 1100px) and (min-width: 992px) {
  #kt_app_content_container, #kt_app_header_container { padding-left: 25px !important; padding-right: 25px !important; }
  input[data-kt-filemanager-table-filter="search"] { width: 215px !important; }
  .card-toolbar .btn { padding: 10px 12px !important; }
}
@media (max-width: 991.98px) {
  :root, body { --bs-app-header-height: 64px; --bs-app-header-height-actual: 64px; }
  #kt_app_header_container { padding-left: 16px !important; padding-right: 16px !important; }
  #kt_app_content_container { padding: 0 20px !important; }
  #kt_app_content { padding-top: 25px !important; }
  .hd-page-heading { margin-bottom: 21px; }
  .hd-page-heading h1 { font-size: 26px; }
  .hd-topbar-name { display: none; }
  .hd-login-layout { grid-template-columns: minmax(0,1fr) 390px; width: calc(100% - 64px); gap: 35px; }
  .hd-login-card { width: 390px !important; padding: 32px 27px 24px !important; }
  .hd-login-story h2 { font-size: 35px; }
  .hd-login-illustration { transform: scale(.8); transform-origin: left top; }
}
@media (max-width: 767.98px) {
  .hd-login-layout { display: flex !important; width: calc(100% - 36px); max-width: 440px; min-height: 100vh; gap: 0; padding: 40px 0 !important; }
  .hd-login-story { width: 100%; padding: 0 0 24px; }
  .hd-login-brand { margin: 0; justify-content: center; font-size: 17px; }
  .hd-login-story h2, .hd-login-story > p, .hd-login-illustration, .hd-login-security { display: none; }
  .hd-login-card { width: 100% !important; padding: 30px 25px 22px !important; }
  .hd-private-badge { font-size: 10px; padding: 6px 10px; }
  .hd-page-heading h1 { font-size: 24px; }
  .hd-page-heading p.hd-subtitle { font-size: 12px; }
  #kt_app_content_container > .card.card-flush > .card-header { padding: 16px !important; gap: 12px; }
  #kt_app_content_container > .card.card-flush > .card-body { padding: 0 12px 15px !important; }
  .card.card-flush > .card-header .card-title { width: 100%; }
  .card.card-flush > .card-header .card-title > div { width: 100%; }
  input[data-kt-filemanager-table-filter="search"] { width: 100% !important; }
  .card.card-flush > .card-header .card-toolbar { margin: 0; }
  .card-toolbar .btn { padding: 10px 13px !important; font-size: 12px; }
  #file_manager_list { min-width: 0 !important; width: 100% !important; }
  #file_manager_list th, #file_manager_list td { min-width: 0 !important; }
  #file_manager_list th:nth-child(3), #file_manager_list td:nth-child(3),
  #file_manager_list th:nth-child(4), #file_manager_list td:nth-child(4) { display: none !important; }
  #file_manager_list th:nth-child(2), #file_manager_list td:nth-child(2) { max-width: 145px; }
  #file_manager_list td a.text-gray-800 { font-size: 12px; }
  #file_manager_list .hd-file-icon { width: 28px; height: 34px; margin-right: 8px; }
  #file_manager_list .hd-file-icon svg { width: 17px; height: 21px; }
  .table tbody td { padding-top: 15px !important; padding-bottom: 15px !important; }
  .hd-direct-download { min-height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
