/* Metronic Demo 1 shell and adapters for CKMS's existing business templates. */
.ckms-app {
  --ink: #252f4a;
  --muted: #78829d;
  --line: #e8eaf0;
  --accent: #1b84ff;
  --bg: #f9f9f9;
  --sidebar-default-width: 264px;
  --sidebar-width: 264px;
  --sidebar-width-collapse: 80px;
  --header-height: 72px;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, 'Segoe UI', 'Malgun Gothic', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.65;
}
.ckms-app button, .ckms-app a { -webkit-tap-highlight-color: transparent; }
.ckms-app a:focus-visible, .ckms-app button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.workspace-wrapper { display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }
.workspace-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line); }
.sidebar-brand { display: flex; align-items: center; padding: 0 25px; gap: 8px; position: relative; flex-shrink: 0; border-bottom: 1px solid var(--line); }
.brand { gap: 11px; letter-spacing: -.04em; font-size: 24px; text-decoration: none !important; }
.brand-mark { width: 35px; height: 35px; border-radius: 10px; background: var(--accent); font-size: 22px; letter-spacing: -.04em; flex-shrink: 0; }
.brand-name { line-height: 1.1; white-space: nowrap; }
.brand-name small { display: block; margin-top: 6px; padding: 0; border: 0; font-size: 10px; letter-spacing: .02em; color: var(--muted); }
.shell-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex-shrink: 0; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; padding: 0; font-size: 19px; }
.shell-icon-button:hover { background: #f1f5f9; color: var(--accent); }
.sidebar-collapse { position: absolute; right: -15px; top: 23px; width: 28px; height: 28px; border-color: var(--line); background: #fff; font-size: 13px; z-index: 1; }
.sidebar-mobile-toggle, .sidebar-mobile-close { display: none; }
.sidebar-navigation { padding: 28px 18px; flex: 1; min-height: 0; overflow: auto; }
.nav-heading { padding: 0 13px; margin: 0 0 12px; color: #99a1b7; font-size: 10px; font-weight: 600; letter-spacing: .1em; white-space: nowrap; }
.sidebar-navigation .kt-menu { display: flex; flex-direction: column; gap: 4px; }
.sidebar-navigation .kt-menu-item { display: block; }
.nav-link { display: flex; align-items: center; gap: 13px; padding: 11px 13px; border-radius: 7px; font-size: 13px; font-weight: 500; white-space: nowrap; color: #4b5675; text-decoration: none !important; min-height: 43px; }
.nav-link > i { width: 20px; flex-shrink: 0; text-align: center; font-size: 19px; color: #99a1b7; }
.nav-link:hover { background: #f8f9fb; color: var(--accent); }
.nav-link.is-active { color: var(--accent); background: #eff6ff; font-weight: 650; }
.nav-link.is-active > i { color: var(--accent); }
.nav-section-heading { margin-top: 32px; }
.nav-project { margin: 28px 0 14px; padding: 19px 13px 0; border-top: 1px solid var(--line); }
.nav-project .nav-heading { padding: 0; margin-bottom: 11px; }
.nav-project-code { display: block; color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.nav-project strong { display: block; font-size: 13px; margin-top: 3px; overflow-wrap: anywhere; }
.sidebar-bottom { padding: 20px 25px; display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); white-space: nowrap; }
.workspace-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #17c653; flex-shrink: 0; }
.workspace-header { position: fixed; inset: 0 0 auto; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 36px; border-bottom: 1px solid var(--line); background: #fff; }
.header-leading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.header-location { display: flex; align-items: center; gap: 12px; font-size: 12px; min-width: 0; }
.header-location > span { color: #99a1b7; white-space: nowrap; }
.header-location strong { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb-divider { margin-left: 12px; color: #d1d5db; }
.header-user { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.user-identity { text-align: right; line-height: 1.5; }
.user-identity strong { display: block; font-size: 12px; font-weight: 600; }
.user-identity small { display: block; color: var(--muted); font-size: 10px; }
.user-avatar { display: grid; place-items: center; width: 36px; height: 36px; background: #eff6ff; color: var(--accent); font-size: 14px; font-weight: 650; border: 1px solid #dbeafe; border-radius: 10px; }
.header-user form { margin: 0; }
.logout-button { border-left: 1px solid var(--line); border-radius: 0; padding-left: 9px; width: 40px; }
.workspace-content { width: 100%; max-width: 1480px; flex: 1; margin: 0 auto; padding: 36px 36px 48px; min-width: 0; }
.workspace-content:focus { outline: none; }
.workspace-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 36px; font-size: 11px; color: #99a1b7; text-align: left; background: #fff; }
.footer-divider { padding: 0 7px; }
.skip-link { position: fixed; top: -80px; left: 15px; padding: 10px 20px; background: #fff; color: var(--accent); border: 2px solid var(--accent); z-index: 100; }
.skip-link:focus { top: 10px; }
.sidebar-backdrop[hidden] { display: none; }

/* Match forms, tables, cards and statuses to the shared Metronic appearance. */
h1 { font-size: 25px; font-weight: 650; letter-spacing: -.04em; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 600; }
.eyebrow { color: #99a1b7; font-size: 10px; letter-spacing: .11em; margin-top: 0; }
.page-heading { margin-bottom: 26px; }
.page-heading .muted { font-size: 12px; }
.button { padding: 9px 15px; border-radius: 6px; min-height: 38px; font-size: 12px; font-weight: 550; line-height: 1.5; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:hover { background: #056ee9; border-color: #056ee9; }
.secondary { color: #4b5675; border-color: #dbdfe9; background: #fff; }
.secondary:hover { color: var(--accent); background: #f9fafb; border-color: #c4d9f8; }
.panel { border-color: var(--line); border-radius: 10px; box-shadow: 0 3px 4px 0 #00000003; }
.panel:not(.latest-file) { display: block; }
.latest-file { flex-direction: row; }
.stats { gap: 20px; }
.stats .panel { padding: 23px 25px; position: relative; }
.stats strong { font-size: 30px; font-weight: 650; letter-spacing: -.04em; }
.stats span { font-size: 12px; }
.metric-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 18px; color: #99a1b7; font-size: 21px; }
.metric-icon.blue { background: #eff6ff; color: #1b84ff; border-color: #dbeafe; }
.metric-icon.green { background: #eafff1; color: #17a64d; border-color: #d4f4df; }
.metric-icon.violet { background: #f5f0ff; color: #7239ea; border-color: #ece3ff; }
.stats .metric-caption { display: block; color: var(--muted); font-size: 11px; margin-top: 10px; }
.filters { padding: 20px 24px; gap: 12px; align-items: center; }
input, select, textarea { border-color: #dbdfe9; border-radius: 6px; padding: 9px 12px; font-size: 13px; line-height: 1.6; }
input:focus, select:focus, textarea:focus { outline: 2px solid #1b84ff20; outline-offset: 0; border-color: var(--accent); }
input[type=checkbox] { accent-color: var(--accent); flex-shrink: 0; padding: 0; }
input[type=file] { font-size: 12px; }
input[type=file]::file-selector-button { border: 0; border-radius: 4px; padding: 5px 10px; margin-right: 12px; background: #f1f5f9; color: #4b5675; cursor: pointer; }
.field label { font-size: 12px; font-weight: 600; }
.field .hint { font-size: 11px; }
.form-panel { max-width: 1100px; }
th { color: #78829d; background: #fcfcfc; padding: 13px 22px; font-size: 11px; }
td { padding: 18px 22px; border-bottom-color: #f1f1f4; font-size: 12px; }
.project-name { font-size: 13px; font-weight: 600; }
.list-caption { font-size: 12px; }
.badge { border: 1px solid #e5e7eb; background: #f9f9f9; font-size: 10px !important; padding: 3px 8px; border-radius: 5px; }
.badge.active { background: #eafff1; border-color: #bff0d0; color: #17a34a !important; }
.badge.completed { background: #eff6ff; border-color: #c8e0ff; color: #1b84ff !important; }
.badge.paused { background: #fff8dd; border-color: #f9e7ac; color: #c88b08 !important; }
.dashboard-row { padding: 20px 0; }
.dashboard-row b { font-size: 13px; font-weight: 600; margin: 3px 0; }
.dashboard-row small { font-size: 11px; }
.module-card { padding: 24px; }
.module-card p { font-size: 12px; line-height: 1.8; }
.person-chip { background: #f9fafb; border: 1px solid var(--line); }
.notice { color: #168345; background: #eafff1; border-color: #bff0d0; font-size: 13px; }
.notice.error { color: #b93838; background: #fff1f1; border-color: #efcece; }
.notice.warning { color: #9f6a13; background: #fff8dd; border-color: #f9e7ac; }
.auth-page { background: radial-gradient(ellipse at top, #edf5ff 0, #f9f9f9 65%); }
.auth-page .workspace-wrapper { padding-top: 72px; }
.auth-page .workspace-header { height: 72px; }
.auth-page .workspace-content { display: flex; flex-direction: column; justify-content: center; }
.auth-page .login-panel { width: 100%; max-width: 440px; padding: 38px; margin: 30px auto; }
.auth-page .login-panel h1 { font-size: 23px; margin-bottom: 12px; }
.auth-page .login-panel > .muted { font-size: 12px; }
.auth-page .login-panel .hint { text-align: center; margin-top: 20px; font-size: 11px; }
.auth-header-caption { color: var(--muted); font-size: 12px; }

@media (min-width: 1024px) {
  .ckms-app.kt-sidebar-collapse { --sidebar-width: var(--sidebar-width-collapse); }
  .ckms-app.kt-sidebar-collapse .workspace-sidebar,
  .ckms-app.kt-sidebar-collapse .workspace-sidebar:hover:not(.animating) { width: var(--sidebar-width); }
  .ckms-app.kt-sidebar-collapse .sidebar-brand { padding-left: 22px; }
  .ckms-app.kt-sidebar-collapse .workspace-sidebar .brand-name,
  .ckms-app.kt-sidebar-collapse .workspace-sidebar .nav-label { display: none; }
  .ckms-app.kt-sidebar-collapse .workspace-sidebar .nav-heading { visibility: hidden; height: 16px; }
  .ckms-app.kt-sidebar-collapse .workspace-sidebar .nav-project { overflow: hidden; height: 30px; margin-top: 15px; padding: 0; }
  .ckms-app.kt-sidebar-collapse .workspace-sidebar .nav-project > * { visibility: hidden; }
  .ckms-app.kt-sidebar-collapse .sidebar-collapse i { transform: rotate(180deg); }
  .ckms-app.kt-sidebar-collapse .sidebar-navigation { padding-left: 14px; padding-right: 14px; overflow-x: hidden; }
}
@media (max-width: 1023px) {
  .ckms-app.demo1 { --sidebar-width: 280px; --header-height: 64px; }
  .workspace-sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar-open { overflow: hidden; }
  .sidebar-open .workspace-sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 40; background: #071b4180; border: 0; width: 100%; height: 100%; cursor: pointer; }
  .sidebar-mobile-toggle, .sidebar-mobile-close { display: inline-flex; }
  .sidebar-mobile-close { margin-left: auto; }
  .sidebar-collapse { display: none; }
  .sidebar-brand { min-height: 64px; }
  .workspace-header { padding: 0 24px; }
  .workspace-content { padding: 28px 24px 40px; }
  .stats { gap: 12px; }
  .stats .panel { padding: 20px; }
  .workspace-footer { padding: 18px 24px; }
}
@media (max-width: 760px) {
  .workspace-header { padding: 0 16px; gap: 12px; }
  .workspace-content { padding: 24px 16px 36px; }
  .header-user { gap: 8px; }
  .user-identity { display: none; }
  .header-location { gap: 7px; font-size: 11px; }
  .header-location > span { display: none; }
  .user-avatar { width: 31px; height: 31px; border-radius: 8px; }
  h1 { font-size: 22px; }
  .action-group { gap: 8px; }
  .button { padding: 9px 12px; font-size: 11px; }
  .page-heading { gap: 16px; }
  .stats { grid-template-columns: 1fr; }
  .stats.dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats .panel { padding: 17px; }
  .stats strong { font-size: 26px; }
  .stats .metric-caption { font-size: 10px; }
  .metric-icon { margin-bottom: 12px; width: 31px; height: 31px; font-size: 18px; }
  .form-panel, .detail-panel { padding: 20px; }
  .latest-file { flex-direction: column; align-items: flex-start; }
  .form-grid, .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .filters { align-items: stretch; padding: 16px; }
  .dashboard-row { gap: 10px; }
  .dashboard-progress { width: 60px; flex-shrink: 0; }
  .dashboard-progress progress { min-width: 0; }
  .workspace-footer { padding: 18px 16px; font-size: 10px; }
  .workspace-footer > span:last-child { display: none; }
  .auth-page .login-panel { padding: 26px; }
  .auth-header-caption { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .ckms-app *, .ckms-app *::before, .ckms-app *::after { scroll-behavior: auto !important; transition: none !important; }
}
