/* ── Workspace Karlsfeld Briefportal – Portal CSS ─────────────── */
:root {
  --bg:      #f7f6f4;
  --white:   #ffffff;
  --ink:     #141210;
  --ink2:    #2e2b27;
  --ink3:    #6b6560;
  --ink4:    #a39d97;
  --border:  #e8e4df;
  --border2: #cec9c2;
  --cta:     #141210;
  --cta-h:   #2e2b27;
  --green:   #1a5c3a;
  --green-bg:#e8f3ed;
  --red:     #a01c1c;
  --red-bg:  #fbeaea;
  --shadow:  0 1px 3px rgba(20,18,16,.06), 0 4px 16px rgba(20,18,16,.07);
  --shadow-l:0 2px 8px rgba(20,18,16,.07), 0 16px 48px rgba(20,18,16,.1);
}

html, body {
  font-family: 'DM Sans', sans-serif !important;
  background: var(--bg) !important;
  color: var(--ink) !important;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  margin: 0 !important;
  padding: 0 !important;
}

/* Reset WordPress-Theme */
.site-header, .site-footer, .wp-block-navigation,
.entry-header, .entry-footer, nav.navigation,
#wpadminbar + * { display: none !important; }

/* ── LOGIN ─────────────────────────────────────────────────────── */
.wbp-login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: var(--bg);
}

.wbp-logo-block {
  text-align: center;
  margin-bottom: 32px;
}
.wbp-logo-block img {
  height: 38px;
  margin-bottom: 10px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.wbp-logo-sub {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-top: 8px;
}

.wbp-login-box {
  background: var(--white);
  border-radius: 18px;
  padding: 44px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-l);
  width: 100%;
  max-width: 420px;
}

.wbp-login-box h2 {
  font-size: 26px !important;
  font-weight: 300 !important;
  letter-spacing: -.03em;
  color: var(--ink);
  margin-bottom: 6px !important;
  font-family: 'DM Sans', sans-serif !important;
}
.wbp-login-box h2 em { font-style: italic; font-weight: 300; }
.wbp-login-sub { font-size: 13px; color: var(--ink3); margin-bottom: 28px; }

.wbp-alert--error {
  background: var(--red-bg);
  border: 1px solid rgba(160,28,28,.12);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--red);
  margin-bottom: 18px;
}

.wbp-field { margin-bottom: 18px; }
.wbp-field label,
.wbp-login-box .form-label {
  display: block;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 7px;
  font-family: 'DM Sans', sans-serif !important;
}
.wbp-field input,
.wbp-login-box input[type="email"],
.wbp-login-box input[type="password"],
.wbp-input {
  width: 100%;
  padding: 12px 15px !important;
  border: 1.5px solid var(--border2) !important;
  border-radius: 10px !important;
  font-size: 15px !important;
  color: var(--ink) !important;
  font-family: 'DM Sans', sans-serif !important;
  background: var(--white) !important;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-shadow: none !important;
}
.wbp-field input:focus,
.wbp-login-box input:focus {
  border-color: var(--ink) !important;
  box-shadow: 0 0 0 3px rgba(20,18,16,.08) !important;
}

.wbp-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink3);
  margin-bottom: 24px;
  cursor: pointer;
}
.wbp-remember input { accent-color: var(--ink); }

.wbp-btn--primary,
.wbp-login-box button[type="submit"] {
  width: 100%;
  padding: 13px !important;
  background: var(--cta) !important;
  color: white !important;
  border: none !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: .02em;
  font-family: 'DM Sans', sans-serif !important;
  cursor: pointer;
  transition: background .15s, transform .1s;
  box-shadow: none !important;
}
.wbp-btn--primary:hover { background: var(--cta-h) !important; }
.wbp-btn--primary:active { transform: scale(.98); }

.wbp-link { color: var(--ink3); text-decoration: underline; text-underline-offset: 2px; font-size: 12px; }

/* ── POSTFACH (wbp_inbox shortcode) ────────────────────────────── */
.wbp-inbox {
  min-height: 100vh;
  background: var(--bg);
  font-family: 'DM Sans', sans-serif;
}

.wbp-inbox-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
}
.wbp-tb-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.wbp-tb-brand img { height: 28px; }
.wbp-tb-brand-text {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
}
.wbp-tb-sep { width: 1px; height: 18px; background: var(--border2); }
.wbp-tb-section { font-size: 13px; color: var(--ink3); }
.wbp-tb-right { display: flex; align-items: center; gap: 8px; }
.wbp-tb-user {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px; border-radius: 8px; cursor: pointer;
  transition: background .15s; text-decoration: none;
}
.wbp-tb-user:hover { background: var(--bg); }
.wbp-tb-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 500;
}
.wbp-tb-username { font-size: 13px; color: var(--ink2); }
.wbp-btn-logout {
  font-size: 12px; color: var(--ink4);
  padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: none;
  font-family: 'DM Sans', sans-serif; cursor: pointer;
  transition: all .15s; text-decoration: none;
}
.wbp-btn-logout:hover { background: var(--red-bg); color: var(--red); border-color: rgba(160,28,28,.2); }

.wbp-inbox-body { max-width: 760px; margin: 0 auto; padding: 40px 24px; }

.wbp-inbox-head {
  display: flex; align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px; gap: 16px; flex-wrap: wrap;
}
.wbp-inbox-head h2 {
  font-size: 30px !important;
  font-weight: 300 !important;
  letter-spacing: -.04em;
  color: var(--ink);
  line-height: 1;
  font-family: 'DM Sans', sans-serif !important;
  margin: 0 !important;
}
.wbp-inbox-head h2 em { font-style: italic; }
.wbp-inbox-head-sub { font-size: 13px; color: var(--ink3); margin-top: 6px; }

/* Stats */
.wbp-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 28px; }
.wbp-stat {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 20px;
}
.wbp-stat-val { font-size: 32px; font-weight: 300; letter-spacing: -.04em; line-height: 1; margin-bottom: 5px; }
.wbp-stat-lbl { font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink4); }

/* Doc list */
.wbp-doc-list { display: flex; flex-direction: column; gap: 8px; }

.wbp-doc-item {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 20px;
  display: flex; align-items: center; gap: 15px;
  transition: border-color .15s, box-shadow .15s, transform .1s;
  text-decoration: none; color: inherit;
}
.wbp-doc-item:hover { border-color: var(--border2); box-shadow: var(--shadow); transform: translateY(-1px); }
.wbp-doc-item.unread { border-left: 2px solid var(--ink); }

.wbp-doc-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--bg); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.wbp-doc-item.unread .wbp-doc-icon { background: #f0ede8; }

.wbp-doc-info { flex: 1; min-width: 0; }
.wbp-doc-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wbp-doc-meta { font-size: 12px; color: var(--ink4); margin-top: 2px; }

.wbp-doc-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.wbp-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.wbp-badge-new { background: var(--ink); color: white; }
.wbp-badge-read { background: var(--bg); color: var(--ink4); border: 1px solid var(--border); }

.wbp-btn-download {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 14px; border: 1.5px solid var(--border2);
  border-radius: 8px; background: white; color: var(--ink2);
  font-size: 12px; font-weight: 500; cursor: pointer;
  font-family: 'DM Sans', sans-serif; transition: all .15s; white-space: nowrap;
  text-decoration: none;
}
.wbp-btn-download:hover { background: var(--ink); color: white; border-color: var(--ink); }

.wbp-empty { text-align: center; padding: 60px 24px; color: var(--ink3); }
.wbp-empty-icon { font-size: 44px; margin-bottom: 12px; }
.wbp-empty h3 { font-size: 20px; font-weight: 300; color: var(--ink2); margin-bottom: 6px; }

.wbp-inbox-footer {
  text-align: center; padding: 16px 24px 36px;
  font-size: 11px; color: var(--ink4); letter-spacing: .03em;
}
.wbp-inbox-footer a { color: var(--ink4); text-decoration: none; }
.wbp-inbox-footer a:hover { color: var(--ink3); }

/* ── PROFIL ────────────────────────────────────────────────────── */
.wbp-profile-box {
  max-width: 500px; margin: 0 auto; padding: 40px 24px;
}
.wbp-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ink3); cursor: pointer;
  margin-bottom: 28px; padding: 0; border: none; background: none;
  font-family: 'DM Sans', sans-serif; transition: color .15s; text-decoration: none;
}
.wbp-back-btn:hover { color: var(--ink); }

.wbp-profile-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px 30px; margin-bottom: 14px;
}
.wbp-profile-card h3 {
  font-size: 18px !important; font-weight: 300 !important;
  letter-spacing: -.02em; margin-bottom: 16px !important;
  padding-bottom: 14px; border-bottom: 1px solid var(--border);
  font-family: 'DM Sans', sans-serif !important;
}
.wbp-profile-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--bg); font-size: 13px;
}
.wbp-profile-row:last-child { border-bottom: none; }
.wbp-profile-label { color: var(--ink3); }
.wbp-profile-value { font-weight: 500; }

/* ── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .wbp-login-box { padding: 28px 22px; }
  .wbp-stats { grid-template-columns: 1fr 1fr; }
  .wbp-stats .wbp-stat:last-child { display: none; }
  .wbp-inbox-head { flex-direction: column; align-items: flex-start; }
  .wbp-doc-item { flex-wrap: wrap; }
  .wbp-doc-actions { width: 100%; justify-content: flex-end; }
  .wbp-inbox-topbar { padding: 0 16px; }
}
