/* Sincwork CI — Echte Farben von test.sincwork.de */
:root {
  --sw-blue: #E5EEED;
  --sw-blue-dark: #0044CC;
  --sw-blue-light: #E8F0FF;
  --sw-orange: #F08A5D;
  --sw-orange-dark: #D77B52;
  --sw-orange-light: #FEF0EA;
  --sw-dark: #0F1420;
  --sw-navy: #1E2D45;
  --sw-navy-2: #002266;
  --sw-gray: #505662;
  --sw-light: #E5EEED;
  --sw-light-blue: #F5F6F8;
  --sw-white: #FFFFFF;
  --sw-border: #E4E9F1;
  --sw-border-hard: #E6E8F0;
  --sw-red: #FF4D4D;
  --sw-green: #22C55E;
  --sw-green-light: #F0FDF4;
  --sw-yellow: #FFDC4B;
  --sw-shadow: 0px 4px 20px rgba(0,0,0,0.06);
  --sw-shadow-md: 0px 10px 40px rgba(128,139,165,0.2);
  --sidebar-width: 252px;
  --topbar-height: 60px;
  --radius: 10px;
  --radius-sm: 6px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--sw-light-blue);
  color: var(--sw-navy);
  font-size: 14px;
  line-height: 1.5;
}

/* ── SIDEBAR ── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sw-dark);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-logo {
  padding: 20px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.sidebar-logo .logo-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo .logo-icon {
  width: 34px; height: 34px;
  background: var(--sw-blue);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: white;
  flex-shrink: 0;
}
.sidebar-logo .logo-text { color: #fff; font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
.sidebar-logo .logo-sub { color: rgba(255,255,255,0.35); font-size: 10px; font-weight: 500; letter-spacing: 0.8px; text-transform: uppercase; margin-top: 1px; }

.sidebar-nav { padding: 12px 0; flex: 1; }
.nav-section {
  font-size: 10px; font-weight: 600; letter-spacing: 1.2px;
  text-transform: uppercase; color: rgba(255,255,255,0.25);
  padding: 14px 20px 5px;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 20px;
  color: rgba(255,255,255,0.6);
  text-decoration: none; font-size: 13px; font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.15s;
  position: relative;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.9); border-left-color: rgba(240,138,93,0.4); }
.sidebar-nav a.active { background: rgba(0,85,255,0.12); color: #fff; border-left-color: var(--sw-blue); font-weight: 600; }
.sidebar-nav a svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.8; }
.sidebar-nav a.active svg { opacity: 1; }
.nav-badge {
  margin-left: auto;
  background: var(--sw-red); color: #fff;
  border-radius: 10px; padding: 1px 6px;
  font-size: 10px; font-weight: 700; line-height: 14px;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.sidebar-avatar {
  width: 34px; height: 34px;
  background: var(--sw-orange); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.sidebar-user-name { font-size: 12px; font-weight: 600; color: #fff; line-height: 1.3; }
.sidebar-user-role { font-size: 10px; color: rgba(255,255,255,0.35); }
.trust-row { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.btn-logout {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: rgba(255,255,255,0.4);
  text-decoration: none; padding: 5px 0; transition: color 0.15s;
}
.btn-logout:hover { color: var(--sw-red); }

/* ── MAIN ── */
.main-content { margin-left: var(--sidebar-width); min-height: 100vh; }

.topbar {
  height: var(--topbar-height);
  background: var(--sw-white);
  border-bottom: 1px solid var(--sw-border);
  display: flex; align-items: center;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 50;
  gap: 12px;
}
.topbar-title { font-size: 16px; font-weight: 700; color: var(--sw-navy-2); }
.topbar-breadcrumb { font-size: 11px; color: var(--sw-gray); margin-top: 1px; }

.page-content { padding: 24px 28px; }

/* ── CARDS ── */
.card {
  background: var(--sw-white);
  border-radius: var(--radius);
  border: 1px solid var(--sw-border);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--sw-shadow);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-title { font-size: 14px; font-weight: 700; color: var(--sw-navy-2); }

/* ── WELCOME BANNER ── */
.welcome-banner {
  background: linear-gradient(135deg, var(--sw-navy-2) 0%, var(--sw-blue) 100%);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 20px;
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
}
.welcome-banner h2 { font-size: 18px; font-weight: 700; margin-bottom: 3px; }
.welcome-banner p { font-size: 13px; opacity: 0.75; }
.welcome-badge {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px; padding: 10px 16px; text-align: center;
}
.welcome-badge .val { font-size: 22px; font-weight: 800; }
.welcome-badge .lbl { font-size: 10px; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── STATS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--sw-white);
  border-radius: var(--radius);
  border: 1px solid var(--sw-border);
  padding: 16px 18px;
  box-shadow: var(--sw-shadow);
  border-top: 3px solid var(--sw-border);
}
.stat-card.blue { border-top-color: var(--sw-blue); }
.stat-card.orange { border-top-color: var(--sw-orange); }
.stat-card.green { border-top-color: var(--sw-green); }
.stat-card.red { border-top-color: var(--sw-red); }
.stat-card.yellow { border-top-color: var(--sw-yellow); }
.stat-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.7px; color: var(--sw-gray); margin-bottom: 5px; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--sw-navy-2); line-height: 1; }
.stat-sub { font-size: 11px; color: #adb5bd; margin-top: 4px; }

/* ── NEXT STEPS ── */
.next-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.next-step-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--sw-white);
  border: 1px solid var(--sw-border);
  border-left: 4px solid var(--sw-orange);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  text-decoration: none; color: var(--sw-navy);
  transition: box-shadow 0.15s;
  box-shadow: var(--sw-shadow);
}
.next-step-item:hover { box-shadow: var(--sw-shadow-md); }
.next-step-icon { font-size: 20px; flex-shrink: 0; }
.next-step-text { font-size: 13px; font-weight: 600; }
.next-step-sub { font-size: 11px; color: var(--sw-gray); margin-top: 1px; }
.next-step-arrow { margin-left: auto; color: var(--sw-orange); font-size: 16px; }

/* ── TRUST BADGE ── */
.trust-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.trust-badge.bronze { background: rgba(205,127,50,0.12); color: #CD7F32; }
.trust-badge.silber { background: rgba(158,158,158,0.12); color: #757575; }
.trust-badge.gold   { background: rgba(240,138,93,0.15); color: #D77B52; }
.trust-badge.platin { background: rgba(0,85,255,0.1);    color: var(--sw-blue); }

/* ── PROGRESS ── */
.progress-wrap { background: var(--sw-border); border-radius: 6px; height: 7px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 6px; transition: width 0.5s; background: var(--sw-blue); }
.progress-fill.orange { background: var(--sw-orange); }
.progress-fill.green { background: var(--sw-green); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; text-decoration: none;
  border: none; cursor: pointer; transition: all 0.15s; line-height: 1;
  white-space: nowrap;
}
.btn-primary { background: var(--sw-orange); color: #fff; }
.btn-primary:hover { background: var(--sw-orange-dark); color: #fff; }
.btn-orange { background: var(--sw-orange); color: #fff; }
.btn-orange:hover { background: var(--sw-orange-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--sw-navy); border: 1.5px solid var(--sw-border); }
.btn-outline:hover { border-color: var(--sw-orange); color: var(--sw-orange); }
.btn-danger { background: var(--sw-red); color: #fff; }
.btn-danger:hover { background: #e03232; color: #fff; }
.btn-ghost { background: transparent; color: var(--sw-gray); border: none; }
.btn-ghost:hover { background: var(--sw-light); color: var(--sw-navy); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 11px 22px; font-size: 14px; border-radius: 8px; }
.btn-block { width: 100%; justify-content: center; }

/* ── STATUS BADGES ── */
.badge {
  display: inline-block; padding: 3px 8px;
  border-radius: 4px; font-size: 11px; font-weight: 600;
}
.badge-neu              { background: #E8F0FF; color: var(--sw-blue); }
.badge-qualifiziert     { background: #FEF3E2; color: #C05621; }
.badge-ausgeschrieben   { background: #EBF8FF; color: #2B6CB0; }
.badge-in_vergabe       { background: #FAF5FF; color: #6B46C1; }
.badge-vergeben         { background: #F0FFF4; color: #276749; }
.badge-in_bearbeitung   { background: #FEF9C3; color: #92400E; }
.badge-abgeschlossen    { background: var(--sw-green-light); color: #15803D; }
.badge-storniert        { background: #FFF1F2; color: #BE123C; }
.badge-ausstehend       { background: #FFFBEB; color: #B45309; }
.badge-in_pruefung      { background: #EFF6FF; color: #1D4ED8; }
.badge-genehmigt        { background: var(--sw-green-light); color: #15803D; }
.badge-abgelehnt        { background: #FFF1F2; color: #BE123C; }
.badge-abgelaufen       { background: #F3F4F6; color: #6B7280; }
.badge-angebot_ausstehend { background: #E8F0FF; color: var(--sw-blue); }
.badge-angebot_abgegeben  { background: #FAF5FF; color: #6B46C1; }
.badge-beauftragt       { background: #FEF3E2; color: #C05621; }
.badge-terminiert       { background: #FEF9C3; color: #92400E; }
.badge-normal { background: #F3F4F6; color: #374151; }
.badge-hoch   { background: #FEF3E2; color: #C05621; }
.badge-dringend { background: #FFF1F2; color: #BE123C; }
.badge-niedrig { background: #F3F4F6; color: #6B7280; }

/* ── TABLES ── */
.sw-table { width: 100%; border-collapse: collapse; }
.sw-table th {
  text-align: left; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.7px; color: var(--sw-gray);
  padding: 9px 12px; border-bottom: 2px solid var(--sw-border);
  white-space: nowrap;
}
.sw-table td {
  padding: 11px 12px; border-bottom: 1px solid var(--sw-light);
  font-size: 13px; vertical-align: middle;
}
.sw-table tr:hover td { background: var(--sw-light-blue); }
.sw-table tr:last-child td { border-bottom: none; }

/* ── FORMS ── */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--sw-navy); margin-bottom: 5px;
}
.form-label .required { color: var(--sw-red); margin-left: 2px; }
.form-control {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--sw-border);
  border-radius: var(--radius-sm);
  font-size: 13px; color: var(--sw-navy);
  background: var(--sw-white);
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.form-control:focus {
  outline: none; border-color: var(--sw-orange);
  box-shadow: 0 0 0 3px rgba(240,138,93,0.12);
}
.form-control::placeholder { color: #adb5bd; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11px; color: var(--sw-gray); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* ── CHECKBOXEN / RADIO ── */
.check-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px; border: 1.5px solid var(--sw-border);
  border-radius: var(--radius-sm); padding: 10px;
  max-height: 180px; overflow-y: auto;
}
.check-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; cursor: pointer; padding: 3px 0;
}
.check-label input[type=checkbox],
.check-label input[type=radio] { accent-color: var(--sw-blue); width: 14px; height: 14px; }

/* ── ALERTS ── */
.alert {
  padding: 11px 15px; border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 14px;
  display: flex; align-items: flex-start; gap: 8px;
  border-left: 3px solid transparent;
}
.alert-success { background: var(--sw-green-light); color: #166534; border-left-color: var(--sw-green); }
.alert-error, .alert-danger { background: #FFF1F2; color: #9F1239; border-left-color: var(--sw-red); }
.alert-warning { background: #FFFBEB; color: #92400E; border-left-color: var(--sw-yellow); }
.alert-info { background: var(--sw-blue-light); color: var(--sw-navy-2); border-left-color: var(--sw-blue); }

/* ── DOKUMENT UPLOAD ── */
.upload-area {
  border: 2px dashed var(--sw-border); border-radius: var(--radius);
  padding: 28px; text-align: center; cursor: pointer;
  transition: all 0.2s; background: var(--sw-light-blue);
}
.upload-area:hover, .upload-area.dragover {
  border-color: var(--sw-blue); background: var(--sw-blue-light);
}
.upload-area .upload-icon { font-size: 32px; margin-bottom: 8px; }
.upload-area p { font-size: 13px; color: var(--sw-gray); }
.upload-area strong { color: var(--sw-blue); }

/* ── PFLICHT CHECKLISTE ── */
.pflicht-list { display: flex; flex-direction: column; gap: 0; }
.pflicht-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid var(--sw-light);
}
.pflicht-item:last-child { border-bottom: none; }
.pflicht-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0; font-weight: 700;
}
.pflicht-icon.ok { background: var(--sw-green-light); color: var(--sw-green); }
.pflicht-icon.pending { background: #FFFBEB; color: #B45309; }
.pflicht-icon.missing { background: #FFF1F2; color: var(--sw-red); }
.pflicht-info { flex: 1; }
.pflicht-name { font-size: 13px; font-weight: 600; color: var(--sw-navy); }
.pflicht-status { font-size: 11px; margin-top: 1px; }

/* ── TRUST PROGRESS ── */
.trust-progress-card { background: linear-gradient(135deg, var(--sw-navy-2), #1a4fa8); border-radius: var(--radius); padding: 20px; color: #fff; }
.trust-progress-card .score { font-size: 36px; font-weight: 800; }
.trust-progress-card .max { font-size: 14px; opacity: 0.6; }
.trust-tip { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 12px; }
.trust-tip:last-child { border-bottom: none; }
.trust-tip .pts { color: var(--sw-orange); font-weight: 700; margin-left: auto; white-space: nowrap; }

/* ── STERNE ── */
.stars { color: #FFDC4B; letter-spacing: 1px; }
.stars-empty { color: #D1D5DB; }

/* ── PROFIL TABS ── */
.tab-nav { display: flex; border-bottom: 2px solid var(--sw-border); margin-bottom: 20px; gap: 0; }
.tab-btn {
  padding: 10px 18px; font-size: 13px; font-weight: 600;
  color: var(--sw-gray); border: none; background: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all 0.15s;
}
.tab-btn:hover { color: var(--sw-orange); }
.tab-btn.active { color: var(--sw-orange); border-bottom-color: var(--sw-orange); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── TRUST BOOST HINWEIS ── */
.trust-boost-hint {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--sw-orange-light); color: var(--sw-orange-dark);
  border-radius: 4px; padding: 2px 8px; font-size: 11px; font-weight: 700;
}

/* ── SECTION DIVIDER ── */
.section-title {
  font-size: 13px; font-weight: 700; color: var(--sw-navy-2);
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--sw-border);
  display: flex; align-items: center; justify-content: space-between;
}

/* ── LOGIN PAGE ── */
.login-page {
  min-height: 100vh; display: flex; background: var(--sw-white);
}
.login-left {
  width: 45%; background: #f1f2f3;
  padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  color: var(--sw-dark); border-right: 1px solid var(--sw-border);
}
.login-left-logo { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; color: var(--sw-navy-2); }
.login-left-logo span { color: var(--sw-orange); }
.login-left h1 { font-size: 30px; font-weight: 800; line-height: 1.2; margin-bottom: 12px; margin-top: 60px; color: var(--sw-navy-2); }
.login-left p { font-size: 14px; color: var(--sw-gray); line-height: 1.7; }
.login-left-footer { font-size: 12px; color: var(--sw-gray); opacity: .6; }
.login-right {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 48px; background: var(--sw-white);
}
.login-box {
  background: var(--sw-white); border-radius: 14px;
  padding: 40px 36px; width: 100%; max-width: 400px;
  box-shadow: var(--sw-shadow-md);
  border: 1px solid var(--sw-border);
}
.login-box h2 { font-size: 22px; font-weight: 800; color: var(--sw-navy-2); margin-bottom: 4px; }
.login-box .sub { font-size: 13px; color: var(--sw-gray); margin-bottom: 24px; }
.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo .logo-text { font-size: 22px; font-weight: 800; color: var(--sw-navy-2); letter-spacing: -.3px; }
.login-logo .logo-text span { color: var(--sw-orange); }
.login-logo .logo-sub { font-size: 11px; color: var(--sw-gray); font-weight: 600; letter-spacing: .4px; text-transform: uppercase; margin-top: 2px; }

/* ── MODAL ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15,20,32,0.6); z-index: 200;
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--sw-white); border-radius: 12px;
  padding: 28px; width: 100%; max-width: 500px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  max-height: 90vh; overflow-y: auto;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-size: 16px; font-weight: 700; color: var(--sw-navy-2); }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #adb5bd; padding: 0; }
.modal-close:hover { color: var(--sw-red); }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state .icon { font-size: 44px; margin-bottom: 12px; }
.empty-state h3 { font-size: 15px; font-weight: 700; color: var(--sw-navy); margin-bottom: 6px; }
.empty-state p { font-size: 13px; color: var(--sw-gray); }

/* ── MOBILE TOGGLE ── */
.mobile-menu-btn {
  display: none; background: none; border: none;
  cursor: pointer; padding: 4px; color: var(--sw-navy);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.25s ease; }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,0.3); }
  .main-content { margin-left: 0; }
  .mobile-menu-btn { display: flex; }
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .login-left { display: none; }
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .welcome-banner { flex-direction: column; gap: 12px; }
  .sw-table { font-size: 12px; }
  .sw-table th, .sw-table td { padding: 8px; }
}

/* ── UTILS ── */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mb-0 { margin-bottom: 0; }
.text-muted { color: var(--sw-gray); }
.text-blue { color: var(--sw-blue); }
.text-orange { color: var(--sw-orange); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.fw-700 { font-weight: 700; }
.w-100 { width: 100%; }
