:root{
  
  --bg-1: #f5f6fa;
  --bg-2: #f0f2f7;
  --bg-3: #ebeef5;
  --surface: #fafbfc;
  --surface-elevated: #ffffff;
  --glass: rgba(255,255,255,.88);
  --text: #1a2332;
  --text-secondary: #556273;
  --muted: #6b7280;
  --border: #d8dce3;
  --border-light: #e8ebf0;

  --primary: #5b5fff;
  --primary-hover: #4845ff;
  --primary-light: #eef0ff;
  --accent: #0ea5e9;
  --accent-light: #e0f2fe;
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;

  
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --header-h: 72px;
  --footer-h: 48px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  --shadow-xs: 0 1px 3px rgba(16,24,40,.04), 0 1px 2px rgba(16,24,40,.06);
  --shadow-sm: 0 4px 8px rgba(16,24,40,.04), 0 2px 4px rgba(16,24,40,.04);
  --shadow-md: 0 12px 24px rgba(16,24,40,.08), 0 4px 8px rgba(16,24,40,.03);
  --shadow-lg: 0 20px 40px rgba(16,24,40,.12), 0 8px 16px rgba(16,24,40,.06);
  --shadow-xl: 0 32px 64px rgba(16,24,40,.16), 0 12px 24px rgba(16,24,40,.08);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: 'Manrope', var(--font-sans);
  --base-size: 15px;
  --line-height: 1.6;

  
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 1.875rem;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  --transition-fast: 140ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 280ms cubic-bezier(0.4, 0, 0.1, 1);
  
  --row-alt: rgba(99,95,255,0.02);
  --row-hover: rgba(99,95,255,0.04);
}


[data-theme="dark"]{
  --bg-1: #0a0e1a;
  --bg-2: #0d1117;
  --bg-3: #0f1419;
  --surface: #161b26;
  --surface-elevated: #1c212e;
  --glass: rgba(255,255,255,0.04);
  --text: #f0f4f8;
  --text-secondary: #b0b8c4;
  --muted: #8b95a6;
  --border: rgba(255,255,255,0.08);
  --border-light: rgba(255,255,255,0.04);

  --shadow-xs: 0 1px 3px rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.15);
  --shadow-sm: 0 4px 8px rgba(0,0,0,.3), 0 2px 4px rgba(0,0,0,.2);
  --shadow-md: 0 12px 24px rgba(0,0,0,.4), 0 4px 8px rgba(0,0,0,.25);
  --shadow-lg: 0 20px 40px rgba(0,0,0,.5), 0 8px 16px rgba(0,0,0,.3);
  --shadow-xl: 0 32px 64px rgba(0,0,0,.6), 0 12px 24px rgba(0,0,0,.4);

  --primary: #7d7dff;
  --primary-hover: #9494ff;
  --primary-light: rgba(125,125,255,0.12);
  --accent: #38bdf8;
  --accent-light: rgba(56,189,248,0.12);
  --success: #34d399;
  --success-light: rgba(52,211,153,0.12);
  --warning: #fbbf24;
  --warning-light: rgba(251,191,36,0.12);
  --danger: #f87171;
  --danger-light: rgba(248,113,113,0.12);
  
  --row-alt: rgba(125,125,255,0.03);
  --row-hover: rgba(125,125,255,0.06);
}


[data-theme="dark"] .appbar{
  background: rgba(22,27,38,.85);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom:1px solid var(--border);
}

[data-theme="dark"] .tablewrap,
[data-theme="dark"] .sheet{
  background: var(--surface);
  border:1px solid var(--border);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .sheetbody{
  background: var(--bg-1);
}



[data-theme="dark"] thead th{
  background: rgba(125, 125, 255, 0.15);
  color: var(--text);
  border-bottom:1px solid rgba(125, 125, 255, 0.3);
}


[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] option {
  background: rgba(255,255,255,0.08);
  color: #e6eef8;
  border:1px solid rgba(255,255,255,0.15);
}
[data-theme="dark"] input:focus, [data-theme="dark"] select:focus, [data-theme="dark"] textarea:focus {
  border-color: var(--primary);
  background: rgba(255,255,255,0.11);
  box-shadow: 0 0 0 4px rgba(124,124,255,0.15);
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: rgba(230,238,248,0.4);
}
[data-theme="dark"] select{
  padding-right:1rem;
  color: #e6eef8;
  background-clip: padding-box;
}
[data-theme="dark"] option{ background: #0f1826; color: #e6eef8; }

[data-theme="dark"] .sheethead,
[data-theme="dark"] .sheetfoot{
  background: var(--surface);
  border-color: var(--border);
}

[data-theme="dark"] .modal{
  background: rgba(10,14,26,.75);
}

[data-theme="dark"] .note-text{
  color: var(--text-secondary);
}


[data-theme="dark"] .s-Offen{
  background: var(--warning-light);
  border-color: rgba(245,158,11,0.3);
  color:#fbbf24;
}
[data-theme="dark"] .s-Vorstellungsgespräch{
  background: var(--success-light);
  border-color: rgba(16,185,129,0.3);
  color:#34d399;
}
[data-theme="dark"] .s-Absage{
  background: var(--danger-light);
  border-color: rgba(239,68,68,0.3);
  color:#fca5a5;
}


*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family:var(--font-sans);
  color:var(--text);
  font-size: var(--base-size);
  line-height: var(--line-height);
  overflow:hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(ellipse 1400px 700px at 20% 0%, rgba(91,95,255,0.08), transparent 70%),
    radial-gradient(ellipse 1200px 600px at 80% 0%, rgba(14,165,233,0.06), transparent 65%),
    var(--bg-1);
}


@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; animation: none !important; }
}

  
  [data-theme="dark"] body{
    background:
      radial-gradient(ellipse 1400px 700px at 20% 0%, rgba(125,125,255,0.08), transparent 70%),
      radial-gradient(ellipse 1200px 600px at 80% 0%, rgba(56,189,248,0.06), transparent 65%),
      var(--bg-1);
  }


.sidebar{
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100vh;
  background: var(--surface-elevated);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transition: left var(--transition-smooth);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.sidebar.open{
  left: 0;
}

.sidebar-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.sidebar-title{
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.sidebar-toggle{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.sidebar-toggle:hover{
  background: var(--primary-light);
  color: var(--primary);
}

.sidebar-toggle i{
  width: 20px;
  height: 20px;
}

.sidebar-nav{
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 0.5rem;
  flex: 1;
}

.sidebar-footer{
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.6;
}

.sidebar-footer a{
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.sidebar-footer a:hover{
  color: var(--primary-hover);
  text-decoration: underline;
}

.sidebar-item{
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-weight: var(--fw-medium);
  font-size: var(--fs-base);
  transition: all var(--transition-fast);
  position: relative;
}

.sidebar-item i{
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-item:hover{
  background: var(--primary-light);
  color: var(--primary);
}

.sidebar-item.active{
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  box-shadow: var(--shadow-sm);
}

.sidebar-item.active::before{
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: white;
  border-radius: 0 3px 3px 0;
}

.sidebar-divider{
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0;
  opacity: 0.5;
}

.sidebar-action{
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-weight: var(--fw-medium);
  font-size: var(--fs-base);
  transition: all var(--transition-fast);
  position: relative;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.sidebar-action i{
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-action:hover{
  background: var(--primary-light);
  color: var(--primary);
}

.sidebar-action:focus{
  outline: none;
}

.sidebar-action:active{
  background: var(--primary-light);
  color: var(--primary);
}

.sidebar-overlay{
  display: none;
}

.sidebar-menu-btn{
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-fast);
}


[data-theme="dark"] .sidebar{
  background: var(--surface-elevated);
  border-right: 1px solid var(--border);
}

[data-theme="dark"] .sidebar-item:hover{
  background: var(--primary-light);
  color: var(--primary);
}

[data-theme="dark"] .sidebar-item.active{
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
}

[data-theme="dark"] .sidebar-action:hover{
  background: var(--primary-light);
  color: var(--primary);
}


.appbar{
  height:var(--header-h);
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding:0 1.5rem;
  position:sticky;
  top:0;
  z-index:100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom:1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
  transition: margin-left var(--transition-smooth);
}

body.sidebar-open .appbar{
  margin-left: 280px;
}

.header-left{
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.header-right{
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.header-logo{
  display: flex;
  align-items: center;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.header-logo:hover{
  opacity: 0.8;
}

.header-logo img{
  height: 36px;
  width: auto;
}

.header-logo{
  display: flex;
  align-items: center;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.header-logo:hover{
  opacity: 0.8;
}

.header-logo img{
  height: 44px;
  width: auto;
}

.appbar::after{
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  opacity: 0.6;
}

.brand{
  display:flex;
  align-items:center;
  gap:.85rem;
  font-family:var(--font-display);
  position:relative;
  z-index:1;
  width: 260px;
  flex-shrink: 0;
}
.logo{
  width:200px;
  height:64px;
  border-radius:var(--radius-sm);
  display:grid;
  place-items:center;
  overflow: hidden;
}
.logo img{
  width: 100%;
  height: 100%;
  object-fit: contain;

}
[data-theme="dark"] .logo img{
  filter: none;
}
.brandname{
  font-weight:var(--fw-bold);
  letter-spacing:-0.02em;
  font-size: clamp(1.125rem, 1.2vw + .9rem, 1.4rem);
  background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


.title{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight:var(--fw-semibold);
  letter-spacing:-0.01em;
  font-size: clamp(var(--fs-lg), 1.6vw + .9rem, var(--fs-2xl));
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  color: var(--text-secondary);
  pointer-events: none;
  z-index: 0;
}


.actions{
  display:flex;
  gap:.65rem;
  align-items:center;
  position:relative;
  z-index:1;
  margin-left: auto;
}
.btn{
  display:inline-flex;
  align-items:center;
  gap:.55rem;
  padding:0.625rem 1rem;
  border-radius:var(--radius-sm);
  cursor:pointer;
  border:1px solid var(--border);
  background: var(--surface);
  font-weight:var(--fw-medium);
  font-size:var(--fs-sm);
  color: var(--text);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
  white-space: nowrap;
  font-family: var(--font-sans);
  line-height: 1;
}
.btn svg{
  width: 18px;
  height: 18px;
  stroke-width: 2;
}
.btn:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--primary);
  background: var(--surface-elevated);
}
.btn:active{
  transform: translateY(0);
}
.btn:focus-visible{
  outline: 2px solid var(--primary);
  outline-offset:2px;
}
.btn-icon{
  padding: 0.625rem;
  aspect-ratio: 1;
}
.btn-icon svg{
  width: 20px;
  height: 20px;
}
.btn-primary{
  border-color:transparent;
  color:#fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover{
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.15);
  border-color: transparent;
}
[data-theme="dark"] .btn{
  background: var(--surface);
  border-color: var(--border);
  color:var(--text);
}
[data-theme="dark"] .btn-primary{
  color:#fff;
}


.dropdown{
  position: relative;
  display: inline-block;
}

.dropdown-arrow{
  width: 16px !important;
  height: 16px !important;
  margin-left: 0.25rem;
  transition: transform var(--transition-fast);
}

.dropdown.open .dropdown-arrow{
  transform: rotate(180deg);
}

.dropdown-menu{
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  display: none;
  z-index: 1000;
  animation: slideDown var(--transition-fast);
}

.dropdown-menu.open{
  display: block;
}

@keyframes slideDown{
  from{
    opacity: 0;
    transform: translateY(-10px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item{
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text);
  text-align: left;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}

.dropdown-item:hover{
  background: var(--primary-light);
  color: var(--primary);
}

.dropdown-item i{
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

[data-theme="dark"] .dropdown-menu{
  background: var(--surface-elevated);
  border-color: var(--border);
}

[data-theme="dark"] .dropdown-item:hover{
  background: var(--primary-light);
  color: var(--primary);
}


.wrap{
  height:calc(100% - var(--header-h));
  padding:1.5rem 1.75rem 0.5rem;
  min-height:0;
  position: relative;
  transition: margin-left var(--transition-smooth);
}

body.sidebar-open .wrap{
  margin-left: 280px;
}


.page{
  display: none;
  opacity: 0;
  width: 100%;
  height: 100%;
}

.page.active{
  display: block;
  opacity: 1;
  animation: fadeIn var(--transition-base) ease-in;
}

@keyframes fadeIn{
  from{
    opacity: 0;
    transform: translateY(10px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut{
  from{
    opacity: 1;
    transform: translateY(0);
  }
  to{
    opacity: 0;
    transform: translateY(10px);
  }
}


#dashboardPage{
  display: none;
  grid-template-rows: auto auto 1fr;
  gap: 1.5rem;
  height: 100%;
}

#dashboardPage.active{
  display: grid;
}


#statsPage{
  display: none;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
  padding-bottom: 2rem;
}

#statsPage.active{
  display: flex;
}


#settingsPage{
  display: none;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
  padding-bottom: 2rem;
}

#settingsPage.active{
  display: flex;
}


#helpPage{
  display: none;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
}

#helpPage.active{
  display: flex;
}


.page-header{
  margin-bottom: 0;
}

.page-header h1{
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-header h1 i{
  width: 32px;
  height: 32px;
  color: var(--primary);
}

.settings-title-desktop{
  display: inline;
}

.settings-title-mobile{
  display: none;
}

.page-content{
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  max-width: 900px;
}

[data-theme="dark"] .page-content{
  background: var(--surface);
  border-color: var(--border);
}


#statsPage .stats-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}


#settingsPage .page-content{
  max-width: 800px;
}


#helpPage .help-container{
  display: flex;
  gap: 2rem;
  flex: 1;
  overflow: hidden;
}

#helpPage .help-sidebar{
  flex-shrink: 0;
  width: 240px;
}

#helpPage .help-content{
  flex: 1;
  overflow-y: auto;
  padding-right: 1rem;
}


.toolbar{
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}


[data-theme="dark"] .toolbar{
  background: var(--surface);
  border-color: var(--border);
}


.dashboard-hero{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(91,95,255,0.12), rgba(14,165,233,0.06));
  box-shadow: var(--shadow-sm);
}

.dashboard-hero h2{
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  line-height: 1.2;
  margin: 0 0 0.35rem 0;
}

.dashboard-hero p{
  margin: 0;
  color: var(--text-secondary);
  max-width: 640px;
}

.dashboard-hero-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

.dashboard-stats-toolbar{
  padding: 0.9rem 1.25rem;
}

.dashboard-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  min-height: 0;
}

.dashboard-panel{
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  padding: 1rem;
  display: grid;
  gap: 0.85rem;
  align-content: start;
  min-height: 0;
}

.dashboard-panel-head h3{
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.dashboard-panel-head h3 i{
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.dashboard-kpi-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.dashboard-kpi{
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-2);
  display: grid;
  gap: 0.3rem;
}

.dashboard-kpi span{
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-kpi strong{
  font-size: var(--fs-xl);
  font-family: var(--font-display);
  line-height: 1;
}

.dashboard-meta-note{
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
}

.dashboard-recent-list{
  display: grid;
  gap: 0.6rem;
}

.dashboard-recent-item{
  border: 1px solid var(--border-light);
  background: var(--surface);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}

.dashboard-recent-item:hover{
  border-color: var(--primary);
  background: var(--primary-light);
}

.dashboard-recent-item strong{
  display: block;
  color: var(--text);
  font-size: var(--fs-sm);
  line-height: 1.3;
  word-break: break-word;
}

.dashboard-recent-item span{
  color: var(--text-secondary);
  font-size: var(--fs-xs);
}

.dashboard-recent-meta{
  white-space: nowrap;
  font-weight: var(--fw-semibold);
}

.dashboard-empty{
  padding: 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  color: var(--muted);
  text-align: center;
}

[data-theme="dark"] .dashboard-hero{
  background: linear-gradient(135deg, rgba(125,125,255,0.2), rgba(56,189,248,0.1));
  border-color: var(--border);
}

[data-theme="dark"] .dashboard-panel,
[data-theme="dark"] .dashboard-recent-item{
  border-color: var(--border);
}


.stats{
  display: flex;
  gap: 2.5rem;
  align-items: center;
}
.stat{
  background: transparent;
  padding: 0;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: none;
  border: none;
  transition: all var(--transition-fast);
  position: relative;
  overflow: visible;
  white-space: nowrap;
}
.stat::before{
  display: none;
}
.stat:hover{
  transform: none;
  box-shadow: none;
  border-color: transparent;
}
.stat:hover::before{
  opacity: 0;
}


.stat-icon{
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.stat-icon svg{
  width: 22px;
  height: 22px;
  stroke-width: 2;
}
.stat-icon-primary{
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(91,95,255,0.25);
}
.stat-icon-warning{
  background: linear-gradient(135deg, var(--warning) 0%, #f97316 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(245,158,11,0.25);
}
.stat-icon-success{
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16,185,129,0.25);
}
.stat-icon-danger{
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(239,68,68,0.25);
}


.stat-content{
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}
.stat-label{
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
}
.stat-value{
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-xl);
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
}


.search-filter-bar{
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: nowrap;
  margin-left: auto;
}

.search-box{
  min-width: 280px;
  width: 350px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-box i{
  position: absolute;
  left: 0.875rem;
  color: var(--muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.search-box input{
  width: 100%;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 0.75rem 0 2.5rem;
  font-size: var(--fs-sm);
  font-family: var(--font-sans);
  background: var(--surface);
  color: var(--text);
  transition: all var(--transition-fast);
}

.search-box input:focus{
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

.search-box input::placeholder{
  color: var(--muted);
}

.filter-group{
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label{
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  margin: 0;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.filter-group select{
  min-width: 180px;
  height: 38px;
  padding: 0 0.75rem;
}


.filter-dropdown{
  position: relative;
}

.btn-filter{
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.filter-badge{
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: var(--fw-bold);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface);
}

.filter-dropdown .dropdown-menu{
  min-width: 320px;
  right: 0;
  left: auto;
}

.dropdown-header{
  padding: 0.75rem 1rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--border-light);
}

.filter-option{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  font-family: var(--font-sans);
}

.filter-option:hover{
  background: var(--bg-2);
}

.filter-option:last-of-type{
  border-bottom: none;
}

.filter-option-content{
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
}

.filter-option-icon{
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.filter-option-icon i{
  width: 18px;
  height: 18px;
}

.filter-option-text{
  flex: 1;
}

.filter-option-title{
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text);
  margin-bottom: 0.25rem;
}

.filter-option-desc{
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.4;
}

.filter-option-indicator{
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  opacity: 0;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.filter-option-indicator i{
  width: 16px;
  height: 16px;
  color: white;
}

.filter-option[data-active="true"]{
  background: var(--primary-light);
}

.filter-option[data-active="true"] .filter-option-icon{
  background: var(--primary);
  color: white;
}

.filter-option[data-active="true"] .filter-option-indicator{
  background: var(--primary);
  opacity: 1;
}

.filter-option[data-active="true"]:hover{
  background: var(--primary-light);
}

[data-theme="dark"] .filter-option:hover{
  background: var(--bg-3);
}

[data-theme="dark"] .filter-option-icon{
  background: var(--bg-3);
}

[data-theme="dark"] .filter-option[data-active="true"]{
  background: rgba(125, 125, 255, 0.15);
}


.toggle-setting{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.toggle-setting-info{
  flex: 1;
}

.toggle-setting-label{
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  color: var(--text);
  margin-bottom: 0.25rem;
}

.toggle-setting-description{
  font-size: var(--fs-sm);
  color: var(--muted);
}

.toggle-switch{
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input{
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider{
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border);
  transition: var(--transition-base);
  border-radius: 26px;
}

.toggle-slider:before{
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: var(--transition-base);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.toggle-switch input:checked + .toggle-slider{
  background-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before{
  transform: translateX(22px);
}

.toggle-switch input:focus + .toggle-slider{
  box-shadow: 0 0 0 3px var(--primary-light);
}

[data-theme="dark"] .toggle-setting{
  background: var(--surface);
}

[data-theme="dark"] .toggle-slider{
  background-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .toggle-slider:before{
  background-color: var(--bg-2);
}


.slider-setting{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.slider-setting label{
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text);
  margin: 0;
}

.slider-value{
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  background: var(--primary-light);
  border-radius: var(--radius-xs);
}

.range-slider{
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  margin: 0.5rem 0;
  position: relative;
}

.range-slider::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(91, 95, 255, 0.4);
  transition: all var(--transition-fast);
  position: relative;
}

.range-slider::-moz-range-thumb{
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(91, 95, 255, 0.4);
  transition: all var(--transition-fast);
}

.range-slider::-webkit-slider-thumb:hover{
  transform: scale(1.15);
  box-shadow: 0 3px 8px rgba(91, 95, 255, 0.5);
}

.range-slider::-moz-range-thumb:hover{
  transform: scale(1.15);
  box-shadow: 0 3px 8px rgba(91, 95, 255, 0.5);
}

.range-slider::-moz-range-track{
  background: var(--border);
  height: 6px;
  border-radius: 3px;
}

.range-slider::-moz-range-progress{
  background: var(--primary);
  height: 6px;
  border-radius: 3px;
}

.slider-labels{
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-top: -0.25rem;
}

[data-theme="dark"] .slider-value{
  background: rgba(125, 125, 255, 0.15);
  color: var(--primary);
}

[data-theme="dark"] .range-slider{
  background: rgba(255, 255, 255, 0.1);
}


.toast-container{
  position: fixed;
  top: 5rem;
  right: 1.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
  max-width: 400px;
}

.toast{
  background: var(--surface-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-appointment{
  border-color: rgba(91, 95, 255, 0.3);
}

.toast-followup{
  border-color: rgba(245, 158, 11, 0.3);
}

.toast-info{
  border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .toast-appointment{
  border-color: rgba(125, 125, 255, 0.4);
}

[data-theme="dark"] .toast-followup{
  border-color: rgba(251, 191, 36, 0.4);
}

[data-theme="dark"] .toast-info{
  border-color: rgba(56, 189, 248, 0.4);
}

.toast-show{
  opacity: 1;
  transform: translateX(0);
}

.toast-hide{
  opacity: 0;
  transform: translateX(100%);
}

.toast-icon{
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-appointment .toast-icon{
  background: rgba(91, 95, 255, 0.1);
  color: var(--primary);
}

.toast-followup .toast-icon{
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.toast-info .toast-icon{
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.toast-icon i{
  width: 20px;
  height: 20px;
}

.toast-content{
  flex: 1;
  min-width: 0;
}

.toast-title{
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text);
  margin-bottom: 0.25rem;
}

.toast-body{
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.4;
}

.toast-close{
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  transition: all var(--transition-fast);
}

.toast-close:hover{
  background: var(--bg-2);
  color: var(--text);
}

.toast-close i{
  width: 16px;
  height: 16px;
}


.number-input-group{
  position: relative;
  display: flex;
  align-items: center;
}

.number-input-group input[type="number"]{
  padding-right: 3.5rem;
}

.input-suffix{
  position: absolute;
  right: 1rem;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  pointer-events: none;
}


.view-toggle{
  display: flex;
  gap: 0.25rem;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.25rem;
}

.view-toggle-btn{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 36px;
  min-height: 36px;
}

.view-toggle-btn svg{
  width: 18px;
  height: 18px;
}

.view-toggle-btn:hover{
  background: var(--surface);
  color: var(--text);
}

.view-toggle-btn.active{
  background: var(--primary);
  color: white;
}


.tablewrap{
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: auto;
  min-height: 0;
}
table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
thead{
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
}
thead th{
  background: rgba(91, 95, 255, 0.15);
  border-bottom: 1px solid rgba(91, 95, 255, 0.3);
  text-align: left;
  padding: 1rem 1.25rem;
  font-weight: var(--fw-semibold);
  color: var(--text);
  cursor: pointer;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background var(--transition-fast);
}
thead th:nth-child(1){ width: 50px; } 
thead th:nth-child(2){ width: 100px; } 
thead th:nth-child(3){ width: 180px; } 
thead th:nth-child(4){ width: 180px; } 
thead th:nth-child(5){ width: 110px; } 
thead th:nth-child(6){ width: 180px; } 
thead th:nth-child(7){ width: 180px; } 
thead th:nth-child(8){ width: 150px; } 
thead th:nth-child(9){ width: 120px; } 


th.sortable{
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 2rem;
}

th.sortable:hover{
  color: var(--primary);
  background: rgba(91, 95, 255, 0.2);
}

th.sortable .sort-icon{
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

th.sortable:hover .sort-icon{
  opacity: 0.3;
}

th.sortable .sort-icon::before{
  content: '⇅';
  font-size: 14px;
  color: var(--text-secondary);
}

th.sortable.sort-asc .sort-icon,
th.sortable.sort-desc .sort-icon{
  opacity: 1;
}

th.sortable.sort-asc .sort-icon::before{
  content: '↑';
  color: var(--primary);
}

th.sortable.sort-desc .sort-icon::before{
  content: '↓';
  color: var(--primary);
}

thead th:hover{
  background: rgba(91, 95, 255, 0.2);
}
tbody td{
  padding: 1rem 1.25rem;
  border-bottom:1px solid var(--border-light);
  vertical-align:middle;
  font-size:var(--fs-sm);
  color: var(--text);
}
tbody tr{
  transition: all var(--transition-fast);
}
tbody tr.table-row-clickable{
  cursor: pointer;
}
tbody tr.table-row-clickable:hover{
  background: var(--row-hover);
}
tbody tr:nth-child(even){
  background: var(--row-alt);
}
tbody tr.table-row-clickable:nth-child(even):hover{
  background: var(--row-hover);
}
tbody tr:last-child td{
  border-bottom: none;
}


.kanban-board{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding: 0;
  min-height: 0;
  height: 100%;
}

.kanban-column{
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.kanban-column-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}


.kanban-column[data-status="Offen"] .kanban-column-header{
  background: rgba(245, 158, 11, 0.18);
  border-bottom: 1px solid rgba(245, 158, 11, 0.4);
}

.kanban-column[data-status="Offen"] .kanban-column-title{
  color: var(--text);
}

.kanban-column[data-status="Offen"] .kanban-column-title svg{
  color: var(--warning);
}

.kanban-column[data-status="Offen"] .kanban-column-count{
  background: rgba(245, 158, 11, 0.25);
  color: var(--warning);
  font-weight: var(--fw-bold);
}

.kanban-column[data-status="Vorstellungsgespräch"] .kanban-column-header{
  background: rgba(16, 185, 129, 0.18);
  border-bottom: 1px solid rgba(16, 185, 129, 0.4);
}

.kanban-column[data-status="Vorstellungsgespräch"] .kanban-column-title{
  color: var(--text);
}

.kanban-column[data-status="Vorstellungsgespräch"] .kanban-column-title svg{
  color: var(--success);
}

.kanban-column[data-status="Vorstellungsgespräch"] .kanban-column-count{
  background: rgba(16, 185, 129, 0.25);
  color: var(--success);
  font-weight: var(--fw-bold);
}

.kanban-column[data-status="Absage"] .kanban-column-header{
  background: rgba(239, 68, 68, 0.18);
  border-bottom: 1px solid rgba(239, 68, 68, 0.4);
}

.kanban-column[data-status="Absage"] .kanban-column-title{
  color: var(--text);
}

.kanban-column[data-status="Absage"] .kanban-column-title svg{
  color: var(--danger);
}

.kanban-column[data-status="Absage"] .kanban-column-count{
  background: rgba(239, 68, 68, 0.25);
  color: var(--danger);
  font-weight: var(--fw-bold);
}

.kanban-column-title{
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: var(--fw-semibold);
  color: var(--text);
  font-size: var(--fs-sm);
}

.kanban-column-title svg{
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.kanban-column-count{
  background: var(--primary-light);
  color: var(--primary);
  font-weight: var(--fw-semibold);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  min-width: 24px;
  text-align: center;
}

.kanban-cards{
  flex: 1;
  padding: 0.625rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}


.kanban-cards::-webkit-scrollbar{
  width: 6px;
}

.kanban-cards::-webkit-scrollbar-track{
  background: transparent;
}

.kanban-cards::-webkit-scrollbar-thumb{
  background: var(--border);
  border-radius: 3px;
  transition: background var(--transition-fast);
}

.kanban-cards::-webkit-scrollbar-thumb:hover{
  background: var(--border-dark);
}

[data-theme="dark"] .kanban-cards::-webkit-scrollbar-thumb{
  background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .kanban-cards::-webkit-scrollbar-thumb:hover{
  background: rgba(255, 255, 255, 0.3);
}

.kanban-card{
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  padding: 0.625rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.kanban-card:hover{
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.kanban-card.dragging{
  opacity: 0.5;
  transform: rotate(2deg);
}

.kanban-card-header{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.375rem;
}

.kanban-card-company{
  font-weight: var(--fw-semibold);
  color: var(--text);
  font-size: var(--fs-sm);
  line-height: 1.2;
}

.kanban-card-date{
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  white-space: nowrap;
  margin-left: 0.375rem;
}

.kanban-card-position{
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
  line-height: 1.3;
}

.kanban-card-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.375rem;
}

.kanban-card-tag{
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.4rem;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}

.kanban-card-tag svg{
  width: 11px;
  height: 11px;
}

.kanban-card-actions{
  display: flex;
  gap: 0.2rem;
  padding-top: 0.375rem;
  border-top: 1px solid var(--border-light);
}

.kanban-card-actions .iconbtn{
  flex: 1;
  padding: 0.2rem;
  min-width: 30px;
  min-height: 30px;
}


.kanban-cards.drag-over{
  background: var(--primary-light);
  border: 2px dashed var(--primary);
  border-radius: var(--radius-md);
}

.kanban-card-placeholder{
  height: 120px;
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.status-badge{
  display:inline-flex;
  align-items:center;
  gap:0.375rem;
  padding:0.375rem 0.75rem;
  border-radius:999px;
  font-weight:var(--fw-semibold);
  font-size:var(--fs-xs);
  border:1px solid transparent;
  background: rgba(0,0,0,0.03);
  color:var(--text);
  transition: all var(--transition-fast);
}
.s-Offen{
  background: var(--warning-light);
  border-color: rgba(245,158,11,0.2);
  color:#92400e;
}
.s-Vorstellungsgespräch{
  background: var(--success-light);
  border-color: rgba(16,185,129,0.2);
  color:#065f46;
}
.s-Absage{
  background: var(--danger-light);
  border-color: rgba(239,68,68,0.2);
  color:#991b1b;
}


.iconbtn{
  border:none;
  background:transparent;
  cursor:pointer;
  font-size:var(--fs-base);
  padding:0.5rem;
  border-radius:var(--radius-xs);
  transition: all var(--transition-fast);
  color: var(--text-secondary);
}
.iconbtn:hover{
  background:var(--primary-light);
  color: var(--primary);
  transform: scale(1.05);
}
[data-theme="dark"] .iconbtn:hover{
  background: var(--primary-light);
  color: var(--primary);
}


.btn-favorite{
  color: var(--muted);
  position: relative;
}

.btn-favorite:hover{
  background: var(--warning-light);
  color: var(--warning);
}

.btn-favorite.favorite-active{
  color: var(--warning);
}

.btn-favorite.favorite-active i{
  fill: var(--warning);
}

.btn-favorite.favorite-active:hover{
  background: var(--warning-light);
  color: #d97706;
}

[data-theme="dark"] .btn-favorite:hover{
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

[data-theme="dark"] .btn-favorite.favorite-active{
  color: #fbbf24;
}

[data-theme="dark"] .btn-favorite.favorite-active i{
  fill: #fbbf24;
}


.kanban-card-favorite{
  border-left: 3px solid var(--warning);
  background: linear-gradient(135deg, var(--surface-elevated), rgba(245, 158, 11, 0.02));
}

[data-theme="dark"] .kanban-card-favorite{
  background: linear-gradient(135deg, var(--surface-elevated), rgba(251, 191, 36, 0.03));
}


.modal{
  position:fixed;
  inset:0;
  background: rgba(10,14,26,.6);
  backdrop-filter: blur(12px);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:1000;
  padding:1rem;
  animation: fadeIn var(--transition-base);
}
.modal.open{
  display:flex;
}
@keyframes fadeIn{
  from { opacity: 0; }
  to { opacity: 1; }
}
.sheet{
  width:min(800px, 94vw);
  background: var(--surface);
  border-radius:var(--radius-xl);
  border:1px solid var(--border);
  box-shadow: var(--shadow-xl);
  overflow:hidden;
  display:grid;
  grid-template-rows:auto 1fr auto;
  animation: slideUp var(--transition-smooth);
}
.sheet-large{
  width:min(1200px, 94vw);
  max-height: 90vh;
}
@keyframes slideUp{
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.sheethead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:1.5rem 1.75rem;
  border-bottom:1px solid var(--border-light);
  background: var(--surface);
}
.sheettitle{
  font-family:var(--font-display);
  font-weight:var(--fw-bold);
  font-size:var(--fs-xl);
  letter-spacing:-0.01em;
  color: var(--text);
}
.sheetbody{
  padding:1.75rem;
  overflow:auto;
  background: var(--bg-1);
}
.sheetfoot{
  display:flex;
  justify-content:flex-end;
  gap:.75rem;
  padding:1.25rem 1.75rem;
  border-top:1px solid var(--border-light);
  background: var(--surface);
}

.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width:720px){
  .grid{
    grid-template-columns: 1fr;
  }
}
label{
  font-weight:var(--fw-semibold);
  color:var(--text);
  font-size:var(--fs-sm);
  display:block;
  margin-bottom:.5rem;
  font-family:var(--font-display);
  letter-spacing:-0.01em;
}
input[type="text"], input[type="date"], select, textarea {
  width:100%;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:0.75rem 1rem;
  font-size:var(--fs-base);
  font-family: var(--font-sans);
  background:var(--surface);
  color: var(--text);
  transition: all var(--transition-fast);
}
input::placeholder, textarea::placeholder{
  color: var(--muted);
}
textarea{
  min-height:110px;
  resize:vertical;
  line-height: 1.6;
}
input:hover, select:hover, textarea:hover{
  border-color: var(--text-secondary);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline:none;
}





.stats-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 0.5rem;
}

.stat-card{
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.stat-card-header{
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.stat-card-header i{
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.stat-card-header h3{
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text);
  margin: 0;
}

.stat-card-body{
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-card-clickable{
  cursor: pointer;
  user-select: none;
}

.stat-card-clickable:hover{
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(91, 95, 255, 0.15);
  transform: translateY(-3px);
}

.activity-period-select{
  margin-bottom: 1rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-sm);
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.activity-period-select:hover{
  border-color: var(--primary-light);
}

.activity-period-select:focus{
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91, 95, 255, 0.1);
}

.stat-big{
  font-size: 2.5rem;
  font-weight: var(--fw-bold);
  color: var(--primary);
  line-height: 1;
}

.stat-label{
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

.stat-list{
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-list-item{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  transition: all var(--transition-fast);
}

.stat-list-item-clickable{
  cursor: pointer;
}

.stat-list-item-clickable:hover{
  background: var(--primary-light);
  border: 1px solid var(--primary);
  transform: translateX(2px);
}

.stat-list-item-label{
  color: var(--text);
  font-weight: var(--fw-medium);
}

.stat-list-item-value{
  color: var(--primary);
  font-weight: var(--fw-semibold);
}

.sheettitle i{
  width: 20px;
  height: 20px;
  margin-right: 0.5rem;
}


[data-theme="dark"] .stat-card{
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .stat-card-clickable:hover{
  border-color: rgba(91, 95, 255, 0.6);
  box-shadow: 0 6px 20px rgba(91, 95, 255, 0.25);
  transform: translateY(-3px);
}

[data-theme="dark"] .activity-period-select{
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

[data-theme="dark"] .activity-period-select:hover{
  border-color: rgba(91, 95, 255, 0.4);
}


.note-text{
  white-space:pre-wrap;
  line-height:1.7;
  color:var(--text);
  font-size: var(--fs-base);
}


.pdf-container{
  background: var(--surface);
  border:1px solid var(--border-light);
  border-radius:var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow:hidden;
}
.pdf-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:1rem 1.25rem;
  background: var(--surface);
  border-bottom:1px solid var(--border-light);
}
.pdf-header h3{
  font-family:var(--font-display);
  font-weight:var(--fw-semibold);
  font-size:var(--fs-lg);
  letter-spacing:-0.01em;
  margin:0;
  color: var(--text);
}
[data-theme="dark"] .pdf-container{
  background: var(--surface);
  border:1px solid var(--border);
  box-shadow: var(--shadow-md);
}


.empty-state{
  padding: 4rem 2rem !important;
  text-align: center;
  border: none !important;
}
.empty-state-content{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto;
}
.empty-state-icon{
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
  display: grid;
  place-items: center;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.empty-state-icon svg{
  width: 40px;
  height: 40px;
  stroke-width: 1.5;
}
.empty-state-content h3{
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
}
.empty-state-content p{
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}


button:focus-visible,
a:focus-visible{
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}


.tablewrap::-webkit-scrollbar{
  width: 10px;
  height: 10px;
}
.tablewrap::-webkit-scrollbar-track{
  background: var(--bg-1);
  border-radius: var(--radius-sm);
}
.tablewrap::-webkit-scrollbar-thumb{
  background: var(--border);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.tablewrap::-webkit-scrollbar-thumb:hover{
  background: var(--text-secondary);
}


@media (max-width: 1024px) {
  .appbar{
    grid-template-columns: auto 1fr auto;
    padding: 1rem;
  }
  .title{
    font-size: var(--fs-lg);
  }
  .brandname{
    display: none;
  }
}

@media (max-width: 768px) {
  .wrap{
    padding: 1rem;
  }
  .stats{
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  .stat{
    padding: 1rem;
  }
  .stat-icon{
    width: 40px;
    height: 40px;
  }
  .stat-icon svg{
    width: 20px;
    height: 20px;
  }
  .stat-value{
    font-size: var(--fs-2xl);
  }
  .actions{
    gap: 0.5rem;
  }
  .btn span{
    display: none;
  }
  .btn-icon{
    padding: 0.5rem;
  }
  .title{
    max-width: 40vw;
  }
}

@media (max-width: 480px) {
  .appbar{
    grid-template-columns: 1fr;
    height: auto;
    padding: 0.75rem;
    gap: 0.75rem;
  }
  .brand{
    justify-content: center;
  }
  .title{
    position: static;
    transform: none;
    max-width: 100%;
  }
  .actions{
    justify-self: center;
  }
  .stats{
    grid-template-columns: 1fr;
  }
  
  
  .kanban-board{
    grid-template-columns: repeat(3, 280px);
    overflow-x: auto;
    padding: 1rem;
    gap: 1rem;
  }
  
  .kanban-column{
    min-height: 300px;
  }
}


@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}


.btn{
  position: relative;
  overflow: hidden;
}

.btn::after{
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width var(--transition-base), height var(--transition-base);
}

.btn:active::after{
  width: 300px;
  height: 300px;
  transition: width 0s, height 0s;
}


tbody tr {
  animation: fadeInRow var(--transition-smooth);
}

@keyframes fadeInRow {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.stat{
  cursor: default;
}

.stat:hover .stat-icon{
  transform: scale(1.05) rotate(5deg);
  transition: transform var(--transition-base);
}

.stat:hover .stat-value{
  color: var(--primary);
  transition: color var(--transition-fast);
}


.modal{
  backdrop-filter: blur(12px) saturate(180%);
}

[data-theme="dark"] .modal{
  backdrop-filter: blur(16px) saturate(180%);
}


*:focus-visible{
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}


::selection{
  background: var(--primary-light);
  color: var(--primary);
}

[data-theme="dark"] ::selection{
  background: var(--primary);
  color: #fff;
}


.logo:active{
  transform: scale(0.98);
}


@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.appbar{
  animation: slideInFromTop 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats{
  animation: slideInFromTop 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s backwards;
}

.tablewrap{
  animation: slideInFromTop 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s backwards;
}


@media (prefers-reduced-motion: reduce) {
  .appbar,
  .stats,
  .tablewrap,
  tbody tr {
    animation: none !important;
  }
  
  .stat:hover .stat-icon{
    transform: none;
  }
}

.tabs-nav{
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-light);
  padding: 0 1.5rem;
  background: var(--bg);
  margin: 0 -1.5rem;
}

.tab-btn{
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
  position: relative;
  margin-bottom: -2px;
}

.tab-btn i{
  width: 18px;
  height: 18px;
}

.tab-btn:hover{
  color: var(--text);
  background: rgba(91, 95, 255, 0.05);
}

.tab-btn.active{
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
}

.tabs-content{
  padding: 1.5rem;
  min-height: 300px;
}

.tab-pane{
  display: none;
}

.tab-pane.active{
  display: block;
  animation: fadeIn 0.3s;
}


.rich-text-editor{
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
}

.editor-toolbar{
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg);
  flex-wrap: wrap;
}

.editor-btn{
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.editor-btn:hover{
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.editor-btn i{
  width: 18px;
  height: 18px;
}

.editor-divider{
  width: 1px;
  height: 36px;
  background: var(--border-light);
  margin: 0 0.25rem;
}

.editor-content{
  min-height: 200px;
  max-height: 400px;
  padding: 1rem;
  overflow-y: auto;
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--text);
}

.editor-content:focus{
  outline: none;
}

.editor-content:empty:before{
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
}

.editor-content ul, .editor-content ol{
  margin-left: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.editor-content li{
  margin-bottom: 0.25rem;
}

.editor-content strong{
  font-weight: var(--fw-bold);
}

.editor-content em{
  font-style: italic;
}

.editor-content u{
  text-decoration: underline;
}


.documents-section{
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

.documents-section #btnAddDoc{
  width: auto;
}

.doc-upload{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  background: rgba(91, 95, 255, 0.03);
  transition: all var(--transition-fast);
}

.doc-upload:hover{
  border-color: var(--primary);
  background: rgba(91, 95, 255, 0.06);
}

.doc-hint{
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  margin: 0;
}

.documents-list{
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.doc-item{
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.doc-item:hover{
  background: var(--surface-elevated);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}

.doc-icon{
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.doc-icon i{
  width: 22px;
  height: 22px;
}

.doc-info{
  flex: 1;
  min-width: 0;
}

.doc-name{
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-meta{
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.doc-actions{
  display: flex;
  gap: 0.25rem;
}


.appointments-section{
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.appointment-form{
  margin-bottom: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.appointment-form select{
  flex: 1;
  min-width: 0;
  padding: 0.625rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-sm);
  font-family: var(--font-sans);
}

.appointment-form input[type="datetime-local"]{
  flex: 0 0 190px;
  padding: 0.625rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-sm);
  font-family: var(--font-sans);
  text-transform: uppercase;
}

.appointment-form input[type="datetime-local"]::-webkit-calendar-picker-indicator{
  cursor: pointer;
  filter: none;
}

[data-theme="dark"] .appointment-form input[type="datetime-local"]::-webkit-calendar-picker-indicator{
  filter: invert(1);
}

.appointment-form select:focus,
.appointment-form input:focus{
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.appointments-list{
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.appointment-card{
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(91, 95, 255, 0.04) 0%, rgba(91, 95, 255, 0.01) 100%);
  border: 1px solid var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.appointment-card:hover{
  background: linear-gradient(135deg, rgba(91, 95, 255, 0.08) 0%, rgba(91, 95, 255, 0.02) 100%);
  box-shadow: 0 2px 8px rgba(91, 95, 255, 0.15);
  transform: translateX(2px);
}

.appointment-card.past{
  opacity: 0.5;
  border-left-color: var(--text-secondary);
  background: var(--surface);
}

.appointment-card.past:hover{
  opacity: 0.7;
}

.appointment-icon{
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-md);
}

.appointment-icon i{
  width: 20px;
  height: 20px;
}

.appointment-content{
  flex: 1;
  min-width: 0;
}

.appointment-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.appointment-type{
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text);
}

.appointment-datetime,
.appointment-location{
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin-top: 0.375rem;
}

.appointment-datetime i,
.appointment-location i{
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
}

.empty-state{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
  text-align: center;
}

.empty-state i{
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.empty-state p{
  margin: 0;
  font-size: var(--fs-sm);
}


[data-theme="dark"] .appointment-card{
  background: linear-gradient(135deg, rgba(91, 95, 255, 0.12) 0%, rgba(91, 95, 255, 0.04) 100%);
  border-color: rgba(91, 95, 255, 0.3);
}

[data-theme="dark"] .appointment-card:hover{
  background: linear-gradient(135deg, rgba(91, 95, 255, 0.18) 0%, rgba(91, 95, 255, 0.06) 100%);
  box-shadow: 0 2px 12px rgba(91, 95, 255, 0.25);
}

[data-theme="dark"] .appointment-card.past{
  background: rgba(255, 255, 255, 0.03);
  border-left-color: rgba(255, 255, 255, 0.2);
}


.links-section{
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.link-add{
  margin-bottom: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.link-add input[type="url"]{
  width: 70%;
  max-width: 70%;
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border) !important;
  padding: 0.75rem 1rem !important;
  font-size: var(--fs-base) !important;
}

.link-add button{
  flex-shrink: 0;
}

.links-list{
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.link-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.link-item:hover{
  border-color: var(--primary);
  background: var(--primary-light);
}

.link-info{
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.link-details{
  flex: 1;
  min-width: 0;
}

.link-url{
  color: var(--primary);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-url:hover{
  text-decoration: underline;
}

.link-meta{
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 0.25rem;
}


.timeline-section{
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-add{
  display: grid;
  grid-template-columns: auto 1fr 2fr auto;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  align-items: center;
}

.timeline-input{
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-sm);
  font-family: var(--font-sans);
  transition: all var(--transition-fast);
}

.timeline-input:focus{
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.timeline-list{
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.timeline-list::before{
  content: '';
  position: absolute;
  left: 32px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: var(--border-light);
}

.timeline-item{
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 1rem;
  padding: 0.75rem 0;
  align-items: center;
  position: relative;
  transition: all var(--transition-fast);
  max-width: 95%;
}

.timeline-item:hover{
  background: rgba(91, 95, 255, 0.03);
  border-radius: var(--radius-md);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.timeline-date{
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  text-align: right;
  padding-right: 1rem;
}

.timeline-content{
  position: relative;
  padding-left: 2rem;
}

.timeline-content::before{
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: var(--primary);
  border: 3px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--primary-light);
  z-index: 1;
}

.timeline-type{
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text);
  margin-bottom: 0.25rem;
}

.timeline-desc{
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

.timeline-remove{
  opacity: 0;
  transition: opacity var(--transition-fast);
  margin-right: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  line-height: 1;
}

.timeline-item:hover .timeline-remove{
  opacity: 1;
}

.empty-message{
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
}

.btn-outline{
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover{
  background: var(--primary);
  color: #fff;
}

.btn-sm{
  padding: 0.5rem 1rem;
  font-size: var(--fs-sm);
}


.modal-layout{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  min-height: 500px;
}

.modal-form-section{
  border-right: 1px solid var(--border-light);
  padding-right: 2rem;
}

.modal-tabs-section{
  display: flex;
  flex-direction: column;
}

.modal-tabs-section .tabs-nav{
  margin: 0;
  padding: 0;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 1.5rem;
}

.modal-tabs-section .tabs-content{
  padding: 0;
  flex: 1;
  overflow-y: auto;
}


.timeline-add{
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  align-items: center;
}


@media (max-width: 1200px){
  .modal-layout{
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .modal-form-section{
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1.5rem;
  }
}


.tabs-container{
  margin-top: 2rem;
}

.tabs-nav{
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 1.5rem;
}

.tab-btn{
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
  margin-bottom: -2px;
}

.tab-btn i{
  width: 16px;
  height: 16px;
}

.tab-btn:hover{
  color: var(--primary);
  background: rgba(91, 95, 255, 0.05);
}

.tab-btn.active{
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tabs-content{
  padding: 1rem 0;
}

.tab-pane{
  display: none;
}

.tab-pane.active{
  display: block;
  animation: fadeIn 0.3s;
}


.documents-section{
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.documents-list{
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.doc-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.doc-item:hover{
  border-color: var(--border);
  background: var(--surface);
}

.doc-info{
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.doc-icon{
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-sm);
}

.doc-details{
  flex: 1;
}

.doc-name{
  font-weight: var(--fw-semibold);
  color: var(--text);
  font-size: var(--fs-sm);
}

.doc-meta{
  font-size: var(--fs-xs);
  color: var(--muted);
}

.doc-actions{
  display: flex;
  gap: 0.5rem;
}


.timeline-section{
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.timeline-add{
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0;
  background: transparent;
  border: none;
  align-items: stretch;
  margin-bottom: 1rem;
}

.timeline-add input[type="date"],
.timeline-add select{
  flex: 0 1 auto;
  width: 100%;
  max-width: 100%;
  padding: 0.625rem 0.875rem !important;
  font-size: 0.9375rem !important;
  line-height: 1.4 !important;
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border) !important;
}

.timeline-add input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.timeline-add input[type="date"]::-webkit-datetime-edit-text,
.timeline-add input[type="date"]::-webkit-datetime-edit-month-field,
.timeline-add input[type="date"]::-webkit-datetime-edit-day-field,
.timeline-add input[type="date"]::-webkit-datetime-edit-year-field {
  text-transform: uppercase;
}

.timeline-add button{
  flex-shrink: 0;
  height: auto;
}

.timeline-list{
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 2rem;
}

.timeline-item{
  position: relative;
  padding: 1rem 0 1rem 1.5rem;
  border-left: 2px solid var(--border-light);
}

.timeline-item:last-child{
  border-left-color: transparent;
}

.timeline-dot{
  position: absolute;
  left: -6px;
  top: 1.5rem;
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--surface);
}

.timeline-date{
  font-size: var(--fs-xs);
  color: var(--muted);
  font-weight: var(--fw-semibold);
}

.timeline-type{
  font-weight: var(--fw-semibold);
  color: var(--text);
  margin: 0.25rem 0;
}

.timeline-desc{
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

.timeline-remove{
  position: absolute;
  right: 0;
  top: 1rem;
}


#modal .sheet{
  width: min(1300px, 97vw);
  max-height: 90vh;
}

#modal .sheetbody{
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(90vh - 150px);
}

.modal-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.modal-form-column{
  padding-right: 0;
}

.modal-tabs-column{
  padding-left: 0;
  border-left: 1px solid var(--border-light);
  padding-left: 2rem;
}

.modal-tabs-column .tabs-container{
  margin-top: 0;
}

.modal-tabs-column .tabs-nav{
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border-light);
  padding: 0;
}

.modal-tabs-column .tab-btn{
  flex: 0 0 auto;
  border-radius: 0;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.6rem 1rem;
  margin-bottom: -2px;
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.2s;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}

.modal-tabs-column .tab-btn i{
  width: 16px;
  height: 16px;
}

.modal-tabs-column .tab-btn:hover{
  color: var(--text);
  background: rgba(91, 95, 255, 0.05);
}

.modal-tabs-column .tab-btn.active{
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
}

.modal-tabs-column .tabs-content{
  padding: 0;
  background: transparent;
  border: none;
  overflow: visible;
}

.modal-tabs-column .tab-pane{
  display: none;
}

.modal-tabs-column .tab-pane.active{
  display: block;
  animation: fadeIn 0.2s;
}

.modal-tabs-column .tab-pane textarea{
  max-width: 95%;
  width: 95%;
  resize: none;
}

.modal-tabs-column .links-section{
  max-width: 100%;
  width: 100%;
}

.modal-tabs-column .links-section .link-add input[type="url"]{
  max-width: 100%;
}

@media (max-width: 1024px){
  .modal-grid{
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .modal-form-column{
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1.5rem;
  }
  
  .modal-tabs-column{
    padding-left: 0;
  }
  
  .modal-tabs-column .tabs-container{
    margin-top: 1rem;
  }
}


.help-container{
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  min-height: 500px;
}

.help-mobile-nav{
  display: none;
}

.help-mobile-nav-label{
  display: block;
  margin: 0 0 0.35rem 0;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.help-nav-select{
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  padding: 0.58rem 0.75rem;
  box-shadow: var(--shadow-xs);
}

.help-nav-select:focus{
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.help-sidebar{
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-right: 1px solid var(--border-light);
  padding-right: 1.5rem;
}

.help-nav-btn{
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  text-align: left;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}

.help-nav-btn i{
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.help-nav-btn:hover{
  background: var(--primary-light);
  color: var(--primary);
}

.help-nav-btn.active{
  background: var(--primary);
  color: white;
  font-weight: var(--fw-semibold);
}

.help-content{
  overflow-y: auto;
  padding-right: 1rem;
}

.help-section{
  display: none;
}

.help-section.active{
  display: block;
  animation: fadeIn 0.3s;
}

.help-section h2{
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: var(--text);
  margin: 0 0 1.5rem 0;
  letter-spacing: -0.01em;
}

.help-section h3{
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--text);
  margin: 0 0 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.help-section h3 i{
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.help-section h4{
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text);
  margin: 1rem 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.help-section h4 i{
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.help-card{
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.help-card:last-child{
  margin-bottom: 0;
}

.help-card p{
  margin: 0 0 1rem 0;
  line-height: 1.6;
  color: var(--text-secondary);
}

.help-card p:last-child{
  margin-bottom: 0;
}

.help-card ul{
  margin: 0.75rem 0 0 0;
  padding-left: 1.5rem;
  list-style: disc;
}

.help-card li{
  margin-bottom: 0.5rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.help-card li:last-child{
  margin-bottom: 0;
}

.help-card strong{
  color: var(--text);
  font-weight: var(--fw-semibold);
}

.help-card code{
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-xs);
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

.help-card a{
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.help-card a:hover{
  color: var(--accent);
  text-decoration: underline;
}

.help-tip{
  border-left: 4px solid var(--primary);
  background: linear-gradient(135deg, var(--primary-light) 0%, transparent 100%);
}

.help-warning{
  border-left: 4px solid var(--warning);
  background: linear-gradient(135deg, var(--warning-light) 0%, transparent 100%);
}


.tooltip-trigger{
  position: relative;
  display: inline-flex;
  cursor: help;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.tooltip-trigger:hover{
  color: var(--primary);
}

.tooltip-trigger:hover::after{
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  pointer-events: none;
}

.tooltip-trigger:hover::before{
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--text);
  z-index: 1000;
}


[data-theme="dark"] .help-card{
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .help-tip{
  background: linear-gradient(135deg, rgba(91, 95, 255, 0.15) 0%, transparent 100%);
}

[data-theme="dark"] .help-warning{
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, transparent 100%);
}

[data-theme="dark"] .tooltip-trigger:hover::after{
  background: var(--surface-elevated);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .help-card a{
  color: var(--accent);
}

[data-theme="dark"] .help-card a:hover{
  color: var(--primary);
}

[data-theme="dark"] .tooltip-trigger:hover::before{
  border-top-color: var(--surface-elevated);
}


@media (max-width: 768px){
  .help-container{
    grid-template-columns: 1fr;
  }
  
  .help-sidebar{
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    padding-right: 0;
    padding-bottom: 1rem;
    flex-direction: row;
    overflow-x: auto;
    gap: 0.25rem;
  }
  
  .help-nav-btn{
    flex-shrink: 0;
    padding: 0.5rem 0.75rem;
  }
  
  .help-nav-btn span{
    display: none;
  }
}


:root{
  --mobile-nav-h: 74px;
}

.table-message-cell{
  color: var(--muted);
  padding: var(--space-4);
  text-align: center;
}

.row-favorite,
.row-actions{
  display: flex;
  align-items: center;
}

.row-favorite{
  justify-content: center;
}

.row-actions{
  justify-content: flex-end;
  gap: 0.45rem;
}

.mobile-dashboard-overview{
  display: none;
}

.mobile-overview-card{
  border: 1px solid var(--border-light);
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  padding: 0.85rem;
  display: grid;
  gap: 0.7rem;
}

.mobile-overview-card h3{
  margin: 0;
  font-size: var(--fs-base);
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.mobile-overview-card h3 i{
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.mobile-overview-kpis{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.mobile-overview-kpis div{
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  padding: 0.6rem 0.65rem;
  display: grid;
  gap: 0.2rem;
}

.mobile-overview-kpis span{
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: var(--fw-semibold);
}

.mobile-overview-kpis strong{
  font-size: var(--fs-lg);
  line-height: 1;
  font-family: var(--font-display);
}

.mobile-overview-list{
  display: grid;
  gap: 0.45rem;
}

.mobile-overview-item{
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0.55rem 0.65rem;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mobile-overview-item:hover{
  border-color: var(--primary);
  background: var(--primary-light);
}

.mobile-overview-item strong{
  display: block;
  color: var(--text);
  font-size: var(--fs-sm);
}

.mobile-overview-item span{
  display: block;
  color: var(--text-secondary);
  font-size: var(--fs-xs);
}

.mobile-overview-item em{
  color: var(--text-secondary);
  font-style: normal;
  font-size: var(--fs-xs);
  white-space: nowrap;
  font-weight: var(--fw-semibold);
}

.mobile-overview-empty{
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  color: var(--muted);
  text-align: center;
  font-size: var(--fs-sm);
}

.entries-cards{
  display: none;
  gap: 0.75rem;
  align-content: start;
  overflow-y: auto;
  min-height: 0;
  padding: 0.1rem;
}

.entry-card{
  border: 1px solid var(--border-light);
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  padding: 0.85rem;
  display: grid;
  gap: 0.75rem;
}

.entry-card-top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.entry-card-main{
  min-width: 0;
}

.entry-card-company{
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  line-height: 1.3;
  color: var(--text);
  word-break: break-word;
}

.entry-card-position{
  margin-top: 0.25rem;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  word-break: break-word;
}

.entry-card-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.entry-card-field{
  display: grid;
  gap: 0.2rem;
}

.entry-card-field span{
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.68rem;
  font-weight: var(--fw-semibold);
}

.entry-card-field strong{
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  word-break: break-word;
}

.entry-card-footer{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.entry-card-actions{
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.entry-card-empty{
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
}

.mobile-nav{
  display: none;
}

[data-theme="dark"] .entry-card{
  background: var(--surface);
  border-color: var(--border);
}

[data-theme="dark"] .mobile-nav{
  background: rgba(17, 24, 39, 0.94);
  border-top-color: var(--border);
}

@media (min-width: 901px){
  .mobile-nav{
    display: none !important;
  }

  #entriesCards{
    display: none !important;
  }
}

@media (max-width: 900px){
  .sidebar{
    left: 0;
    width: min(340px, 90vw);
    transform: translateX(calc(-100% - 12px));
    transition: transform var(--transition-smooth);
    z-index: 1200;
  }

  .sidebar.open{
    transform: translateX(0);
  }

  .sidebar-overlay{
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(12, 18, 31, 0.42);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    z-index: 1190;
  }

  .sidebar-overlay.open{
    opacity: 1;
    pointer-events: auto;
  }

  body.sidebar-open .appbar,
  body.sidebar-open .wrap{
    margin-left: 0 !important;
  }

  body.sidebar-open{
    overflow: hidden;
  }

  .sidebar-nav{
    padding: 0.75rem;
  }

  .sidebar-footer{
    display: none;
  }

  .appbar{
    height: 68px;
    padding: 0 0.75rem;
    z-index: 1180;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(16px) saturate(170%);
  }

  .title{
    display: none;
  }

  .header-left{
    flex: 0 0 auto;
    gap: 0.45rem;
  }

  .header-right{
    margin-left: auto;
    gap: 0.45rem;
  }

  .sidebar-menu-btn,
  #btnTheme,
  #btnNew{
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    flex: 0 0 52px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-xs);
    padding: 0;
    display: inline-grid;
    place-items: center;
  }

  .sidebar-menu-btn svg,
  .sidebar-menu-btn i{
    width: 28px;
    height: 28px;
  }

  #btnTheme svg,
  #btnTheme i,
  #btnNew svg,
  #btnNew i{
    width: 24px;
    height: 24px;
  }

  .header-logo{
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: var(--surface);
    padding: 0.35rem 0.45rem;
    box-shadow: var(--shadow-xs);
  }

  #btnNew{
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.15);
  }

  #btnNew span{
    display: none;
  }

  .header-logo img{
    height: 30px;
  }

  .wrap{
    height: calc(100vh - 68px - var(--mobile-nav-h));
    height: calc(100dvh - 68px - var(--mobile-nav-h));
    padding: 0.75rem 0.75rem 0.5rem;
  }

  #dashboardPage{
    grid-template-rows: auto auto 1fr;
    gap: 0.75rem;
  }

  .toolbar{
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .stats{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
  }

  .stat{
    min-width: 0;
    white-space: normal;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--surface);
    padding: 0.55rem 0.6rem;
  }

  .stat-content{
    justify-content: space-between;
    width: 100%;
  }

  .search-filter-bar{
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .search-box{
    min-width: 0;
    width: 100%;
    flex: 1 1 100%;
  }

  .filter-group{
    flex: 1 1 100%;
  }

  .filter-group label{
    display: none;
  }

  .filter-group select{
    width: 100%;
    min-width: 0;
  }

  .filter-dropdown{
    flex: 1 1 auto;
  }

  .filter-dropdown .btn-filter{
    width: 100%;
    justify-content: center;
  }

  .filter-dropdown .dropdown-menu{
    min-width: min(92vw, 360px);
    max-width: 92vw;
    left: 0;
    right: auto;
  }

  .view-toggle{
    margin-left: auto;
  }

  #entriesList{
    display: none !important;
  }

  #entriesCards{
    display: grid;
  }

  #entriesCards .entry-card,
  #entriesCards .entry-card-empty{
    border-radius: var(--radius-sm);
  }

  body.mobile-home-mode .mobile-dashboard-overview{
    display: grid;
    gap: 0.75rem;
    grid-row: 2 / -1;
    height: 100%;
    min-height: 0;
  }

  body.mobile-home-mode .wrap{
    padding-bottom: 0.75rem;
  }

  body.mobile-home-mode .mobile-dashboard-overview .mobile-overview-card:not(.mobile-overview-summary){
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  body.mobile-home-mode .mobile-dashboard-overview .mobile-overview-summary{
    display: none;
  }

  body.mobile-home-mode .mobile-dashboard-overview .mobile-overview-list{
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }

  body.mobile-home-mode .search-filter-bar{
    display: none;
  }

  body.mobile-home-mode #entriesList,
  body.mobile-home-mode #entriesCards,
  body.mobile-home-mode #kanbanBoard{
    display: none !important;
  }

  body.mobile-applications-mode .mobile-dashboard-overview{
    display: none;
  }

  .kanban-board{
    grid-template-columns: repeat(3, minmax(250px, 1fr));
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  #helpPage{
    height: 100%;
    min-height: 0;
  }

  #helpPage .help-container{
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 0.75rem;
    overflow: hidden;
  }

  #helpPage .help-mobile-nav{
    display: grid;
    gap: 0.35rem;
  }

  #helpPage .help-sidebar{
    display: none;
  }

  #helpPage .help-content{
    padding-right: 0;
    overflow-y: auto;
  }

  #helpPage .help-card{
    padding: 1rem;
    margin-bottom: 0.9rem;
    border-radius: var(--radius-sm);
  }

  #helpPage .help-section h2{
    font-size: var(--fs-xl);
    margin-bottom: 0.9rem;
  }

  .mobile-nav{
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    gap: 0.25rem;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--mobile-nav-h);
    padding: 0.45rem 0.35rem calc(0.45rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid var(--border-light);
    backdrop-filter: blur(14px) saturate(160%);
    z-index: 1185;
  }

  .mobile-nav-item{
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    gap: 0.18rem;
    font-size: 0.65rem;
    font-weight: var(--fw-semibold);
    font-family: var(--font-sans);
    cursor: pointer;
    min-height: 100%;
    transition: all var(--transition-fast);
  }

  .mobile-nav-item i{
    width: 18px;
    height: 18px;
  }

  .mobile-nav-item.active{
    color: var(--primary);
    background: var(--primary-light);
  }
}

@media (max-width: 640px){
  .stats{
    grid-template-columns: 1fr;
  }

  .entry-card-grid{
    grid-template-columns: 1fr;
  }

  #helpPage .help-sidebar{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px){
  .entry-card{
    padding: 0.75rem;
    gap: 0.65rem;
  }

  .mobile-nav-item{
    font-size: 0.65rem;
  }
}

@media (max-width: 900px){
  .appbar{
    height: 82px;
    padding: 0 0.95rem;
  }

  .wrap{
    height: calc(100vh - 82px - var(--mobile-nav-h));
    height: calc(100dvh - 82px - var(--mobile-nav-h));
  }

  .header-left{
    position: static;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0.72rem;
    z-index: 3;
  }

  .header-right{
    margin-left: auto;
    flex: 0 0 auto;
    gap: 0.55rem;
    z-index: 3;
  }

  .sidebar-menu-btn,
  #btnNew,
  #btnTheme{
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    flex: 0 0 52px;
    padding: 0;
    display: inline-grid;
    place-items: center;
  }

  .sidebar-menu-btn{
    background: var(--surface) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-xs) !important;
  }

  #btnNew{
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.15);
  }

  #btnTheme{
    background: var(--surface) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-xs) !important;
  }

  .sidebar-menu-btn svg,
  .sidebar-menu-btn i{
    width: 28px;
    height: 28px;
    stroke-width: 2.4;
  }

  #btnTheme svg,
  #btnTheme i{
    width: 24px;
    height: 24px;
    stroke-width: 2.4;
  }

  #btnNew svg,
  #btnNew i{
    width: 24px;
    height: 24px;
  }

  #btnNew span{
    display: none;
  }

  .header-logo{
    position: static;
    transform: none;
    flex: 0 0 auto;
    margin: 0;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    z-index: 3;
  }

  .header-logo img{
    display: block;
    width: auto;
    height: 48px;
    max-width: 120px;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transform: none;
  }

  body.mobile-applications-mode .stats{
    display: none;
  }

  body.mobile-applications-mode .toolbar{
    padding: 0.7rem;
  }

  #viewBoard,
  #kanbanBoard{
    display: none !important;
  }

  #helpPage{
    gap: 0.75rem;
  }

  #statsPage .page-header,
  #settingsPage .page-header,
  #helpPage .page-header{
    display: none;
  }

  #statsPage .page-header h1,
  #settingsPage .page-header h1,
  #helpPage .page-header h1{
    font-size: 1.25rem;
    gap: 0.5rem;
  }

  #statsPage .page-header h1 i,
  #settingsPage .page-header h1 i,
  #helpPage .page-header h1 i{
    width: 22px;
    height: 22px;
  }

  #settingsPage .settings-title-desktop,
  #settingsTitle .settings-title-desktop{
    display: none;
  }

  #settingsPage .settings-title-mobile,
  #settingsTitle .settings-title-mobile{
    display: inline;
  }

  #helpPage .help-container{
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    overflow: visible;
  }

  #helpPage .help-mobile-nav{
    display: grid;
    width: 100%;
    gap: 0.35rem;
  }

  #helpPage .help-mobile-nav-label{
    margin: 0;
    font-size: 0.68rem;
  }

  #helpPage .help-nav-select{
    min-height: 42px;
    padding: 0.52rem 0.7rem;
    font-size: 0.85rem;
  }

  #helpPage .help-sidebar{
    display: none;
  }

  #helpPage .help-content{
    padding-right: 0;
    overflow-y: auto;
  }

  #helpPage .help-section h2{
    font-size: 1.15rem;
    margin-bottom: 0.7rem;
  }

  #helpPage .help-card{
    padding: 0.85rem;
    margin-bottom: 0.65rem;
    border-radius: var(--radius-sm);
  }

  #helpPage .help-card h3{
    font-size: var(--fs-base);
    margin-bottom: 0.5rem;
  }

  #helpPage .help-card p,
  #helpPage .help-card li{
    font-size: 0.9rem;
    line-height: 1.45;
  }

  #modal{
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
    z-index: 1400;
  }

  #modal .sheet{
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  #modal .sheethead{
    padding: 0.85rem 0.95rem;
  }

  #modal .sheettitle{
    font-size: var(--fs-lg);
  }

  #modal .sheetbody{
    padding: 0.85rem 0.95rem 1rem;
    max-height: none;
    overflow-y: auto;
  }

  #modal .sheetfoot{
    padding: 0.75rem 0.95rem calc(0.75rem + env(safe-area-inset-bottom));
    gap: 0.5rem;
  }

  #modal .sheetfoot .btn{
    flex: 1 1 auto;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  #modal .modal-grid{
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  #modal .modal-form-column,
  #modal .modal-tabs-column{
    min-width: 0;
    padding: 0;
    border: none;
  }

  #modal .tabs-container{
    margin-top: 0.75rem;
    min-width: 0;
  }

  #modal .modal-tabs-column .tabs-nav{
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.45rem;
    margin: 0 0 0.75rem;
    padding: 0 0 0.2rem;
    border-bottom: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  #modal .modal-tabs-column .tabs-nav::-webkit-scrollbar{
    display: none;
  }

  #modal .modal-tabs-column .tab-btn{
    flex: 0 0 auto;
    margin: 0;
    padding: 0.52rem 0.78rem;
    border: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.74rem;
    white-space: nowrap;
  }

  #modal .modal-tabs-column .tab-btn.active{
    border-color: var(--primary);
    background: var(--primary-light);
  }

  #modal .modal-tabs-column .tab-btn i{
    width: 14px;
    height: 14px;
  }

  #modal .modal-tabs-column .tabs-content{
    min-width: 0;
    padding: 0;
  }

  #modal .modal-tabs-column .tab-pane{
    min-width: 0;
  }

  #modal .modal-tabs-column .tab-pane textarea{
    width: 100%;
    max-width: 100%;
    min-height: 120px;
  }

  #modal input[type="text"],
  #modal input[type="date"],
  #modal input[type="datetime-local"],
  #modal input[type="url"],
  #modal select,
  #modal textarea{
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #modal .appointment-form{
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  #modal .appointment-form input[type="datetime-local"]{
    flex: 1 1 auto;
  }

  #modal .link-add{
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
  }

  #modal .link-add input[type="url"]{
    width: 100% !important;
    max-width: 100% !important;
  }

  #modal .timeline-add{
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    padding: 0.65rem;
  }

  #modal .timeline-add select{
    grid-column: 1 / -1;
  }

  #modal .timeline-add input[type="date"],
  #modal .timeline-add select{
    width: 100% !important;
  }

  #modal .timeline-list::before{
    left: 22px;
  }

  #modal .timeline-item{
    max-width: 100%;
    grid-template-columns: 90px 1fr auto;
    gap: 0.55rem;
    padding: 0.6rem 0;
  }

  #modal .timeline-date{
    padding-right: 0.35rem;
  }
}

@media (max-width: 520px){
  #helpPage .help-nav-select{
    min-height: 40px;
    font-size: 0.82rem;
    padding: 0.5rem 0.66rem;
  }
}

@media (max-width: 900px){
  .appbar{
    animation: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255,255,255,0.98) !important;
  }

  [data-theme="dark"] .appbar{
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(22,27,38,0.98) !important;
  }

  .sidebar-menu-btn,
  #btnNew,
  #btnTheme,
  .header-logo{
    transform: none !important;
    filter: none !important;
  }

  .sidebar-menu-btn svg,
  #btnNew svg,
  #btnTheme svg{
    stroke-width: 2 !important;
    shape-rendering: geometricPrecision;
  }

  .header-logo img{
    width: 106px !important;
    height: 62px !important;
    max-width: 106px;
    object-fit: contain;
    image-rendering: auto !important;
    image-rendering: -webkit-optimize-contrast !important;
    filter: contrast(1.06) saturate(1.03);
  }
}
