/* ==========================================================================
   Kumbhar Group of Companies — WorkFlow 360 Design System & Layout Styles
   ========================================================================== */

:root {
  /* Kumbhar Group Brand Color Palette */
  --wf-primary: #240166;
  --wf-primary-hover: #1a014a;
  --wf-primary-soft: #f3effb;
  --wf-primary-border: #d5c7f0;

  --wf-gold: #d99b16;
  --wf-gold-bright: #f1c45b;
  --wf-gold-soft: #fef9ec;
  --wf-gold-border: #f3dc9e;

  --wf-navy: #17043d;
  --wf-text-primary: #1e1b2e;
  --wf-text-secondary: #4a4563;
  --wf-text-muted: #66617d;
  --wf-text-subtle: #9691ab;

  --bs-primary: #240166;
  --bs-primary-rgb: 36, 1, 102;
  --bs-link-color: #240166;
  --bs-link-hover-color: #1a014a;

  --wf-bg-app: #f8fafc;
  --wf-bg-surface: #ffffff;
  --wf-bg-subtle: #f1f5f9;
  --wf-bg-hover: #f8fafc;

  --wf-border: #e2e8f0;
  --wf-border-strong: #cbd5e1;

  /* Semantic Colors */
  --wf-success: #059669;
  --wf-success-soft: #ecfdf5;
  --wf-success-border: #a7f3d0;

  --wf-warning: #d97706;
  --wf-warning-soft: #fffbeb;
  --wf-warning-border: #fde68a;

  --wf-danger: #dc2626;
  --wf-danger-soft: #fef2f2;
  --wf-danger-border: #fecaca;

  --wf-info: #0284c7;
  --wf-info-soft: #f0f9ff;
  --wf-info-border: #bae6fd;

  --wf-purple: #7c3aed;
  --wf-purple-soft: #f5f3ff;
  --wf-purple-border: #ddd6fe;

  /* Layout Dimensions */
  --wf-sidebar-width: 264px;
  --wf-sidebar-collapsed: 74px;
  --wf-topbar-height: 64px;

  /* Typography */
  --wf-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;

  /* Radii & Shadows */
  --wf-radius-sm: 6px;
  --wf-radius-md: 10px;
  --wf-radius-lg: 12px;
  --wf-radius-xl: 16px;

  --wf-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --wf-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --wf-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --wf-shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.08), 0 4px 10px rgba(15, 23, 42, 0.04);

  /* Transitions */
  --wf-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--wf-font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--wf-text-primary);
  background-color: var(--wf-bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--wf-navy);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-top: 0;
}

a {
  color: var(--wf-primary);
  text-decoration: none;
  transition: var(--wf-transition);
}

a:hover {
  color: var(--wf-primary-hover);
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ==========================================================================
   App Shell Layout
   ========================================================================== */
.wf-app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background-color: var(--wf-bg-app);
}

.wf-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--wf-sidebar-width);
  background-color: var(--wf-bg-surface);
  border-right: 1px solid var(--wf-border);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: width 0.22s ease, transform 0.25s ease;
}

.wf-sidebar-header {
  height: var(--wf-topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--wf-border);
  flex-shrink: 0;
}

.wf-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  overflow: hidden;
  white-space: nowrap;
}

.wf-brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background-color: var(--wf-primary);
  color: var(--wf-gold-bright);
  border: 1px solid rgba(241, 196, 91, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(36, 1, 102, 0.22);
}

.wf-brand-logo-img {
  height: 32px;
  width: auto;
  max-width: 175px;
  object-fit: contain;
  display: block;
}

.wf-brand-product-pill {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--wf-primary);
  background-color: var(--wf-gold-soft);
  border: 1px solid var(--wf-gold-border);
  border-radius: 999px;
  padding: 1px 7px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.4;
}

.wf-sidebar-toggle-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--wf-border);
  background: var(--wf-bg-surface);
  color: var(--wf-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--wf-transition);
  flex-shrink: 0;
}

.wf-sidebar-toggle-btn:hover {
  background: var(--wf-bg-subtle);
  color: var(--wf-navy);
}

.wf-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 12px;
}

.wf-nav-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wf-text-subtle);
  padding: 10px 10px 6px;
  white-space: nowrap;
}

.wf-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wf-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--wf-radius-sm);
  color: var(--wf-text-secondary);
  font-weight: 500;
  font-size: 13.5px;
  text-decoration: none;
  transition: var(--wf-transition);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
}

.wf-nav-link i.wf-nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: var(--wf-text-muted);
  transition: var(--wf-transition);
  flex-shrink: 0;
}

.wf-nav-link:hover {
  background-color: var(--wf-bg-subtle);
  color: var(--wf-navy);
}

.wf-nav-link:hover i.wf-nav-icon {
  color: var(--wf-navy);
}

.wf-nav-link.active {
  background-color: var(--wf-primary-soft);
  color: var(--wf-primary);
  font-weight: 600;
}

.wf-nav-link.active i.wf-nav-icon {
  color: var(--wf-primary);
}

.wf-sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--wf-border);
  background-color: var(--wf-bg-surface);
  flex-shrink: 0;
}

.wf-demo-role-box {
  background-color: var(--wf-bg-app);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-md);
  padding: 10px 12px;
}

.wf-demo-role-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wf-text-muted);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Collapsed Sidebar State (Desktop) */
body.wf-sidebar-collapsed .wf-sidebar {
  width: var(--wf-sidebar-collapsed);
}

body.wf-sidebar-collapsed .wf-nav-label,
body.wf-sidebar-collapsed .wf-nav-section-label,
body.wf-sidebar-collapsed .wf-demo-role-box,
body.wf-sidebar-collapsed .wf-brand {
  display: none !important;
}

body.wf-sidebar-collapsed .wf-sidebar-header {
  justify-content: center;
  padding: 0 8px;
}

body.wf-sidebar-collapsed .wf-nav-link {
  justify-content: center;
  padding: 10px;
}

body.wf-sidebar-collapsed .wf-main-wrapper {
  margin-left: var(--wf-sidebar-collapsed);
}

/* Main Content Wrapper */
.wf-main-wrapper {
  flex: 1;
  margin-left: var(--wf-sidebar-width);
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.22s ease;
}

/* Top Navigation Bar */
.wf-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  height: var(--wf-topbar-height);
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--wf-border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wf-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.wf-mobile-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--wf-radius-sm);
  border: 1px solid var(--wf-border);
  background: var(--wf-bg-surface);
  color: var(--wf-navy);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.wf-page-heading {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wf-page-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--wf-navy);
  margin: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wf-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--wf-text-muted);
  margin: 0;
  padding: 0;
  list-style: none;
}

.wf-breadcrumb li + li::before {
  content: "/";
  color: var(--wf-text-subtle);
  margin-right: 6px;
}

.wf-breadcrumb a {
  color: var(--wf-text-muted);
}

.wf-breadcrumb a:hover {
  color: var(--wf-primary);
}

.wf-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Global Search Input */
.wf-global-search {
  position: relative;
  width: 260px;
}

.wf-global-search .wf-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--wf-text-subtle);
  font-size: 14px;
  pointer-events: none;
}

.wf-global-search input {
  width: 100%;
  height: 36px;
  padding: 0 14px 0 34px;
  border-radius: var(--wf-radius-sm);
  border: 1px solid var(--wf-border);
  background-color: var(--wf-bg-app);
  font-size: 13px;
  color: var(--wf-text-primary);
  transition: var(--wf-transition);
}

.wf-global-search input:focus {
  outline: none;
  background-color: var(--wf-bg-surface);
  border-color: var(--wf-primary);
  box-shadow: 0 0 0 3px rgba(36, 1, 102, 0.12);
}

.wf-global-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  width: 340px;
  max-height: 380px;
  overflow-y: auto;
  background: var(--wf-bg-surface);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-md);
  box-shadow: var(--wf-shadow-lg);
  z-index: 1060;
  display: none;
}

.wf-user-menu-btn {
  height: 36px;
  padding: 0 10px;
  border-radius: var(--wf-radius-sm);
  border: 1px solid var(--wf-border);
  background-color: var(--wf-bg-surface);
  color: var(--wf-text-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--wf-transition);
}

.wf-user-menu-btn:hover {
  background-color: var(--wf-bg-subtle);
}

/* Main Content Area */
.wf-content {
  flex: 1;
  padding: 18px 20px;
  max-width: 100%;
  width: 100%;
  margin: 0;
}

.wf-page-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}

.wf-page-subtitle {
  font-size: 13.5px;
  color: var(--wf-text-muted);
  margin: 2px 0 0;
}

.wf-readonly-banner {
  background-color: var(--wf-warning-soft);
  border: 1px solid var(--wf-warning-border);
  color: #92400e;
  padding: 10px 14px;
  border-radius: var(--wf-radius-md);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.wf-demo-banner {
  background-color: var(--wf-info-soft);
  border: 1px solid var(--wf-info-border);
  color: #075985;
  padding: 10px 16px;
  border-radius: var(--wf-radius-md);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.wf-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.45);
  z-index: 1035;
  display: none;
}

.wf-sidebar-backdrop.show {
  display: block;
}

/* Login Page Specific */
.wf-login-page {
  min-height: 100vh;
  background-color: var(--wf-bg-app);
  display: flex;
  align-items: stretch;
}

.wf-login-brand-panel {
  flex: 1;
  background-color: #240166;
  color: #ffffff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border-right: 3px solid var(--wf-gold-bright);
}

.wf-login-logo-card {
  display: inline-flex;
  align-items: center;
  background-color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--wf-radius-md);
  border: 1px solid var(--wf-gold-border);
  box-shadow: 0 8px 24px rgba(10, 2, 32, 0.28);
}

.wf-gold-accent-text {
  color: var(--wf-gold-bright) !important;
}

.wf-login-form-panel {
  width: 540px;
  max-width: 100%;
  background-color: var(--wf-bg-surface);
  padding: 44px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--wf-border);
}

