/* ═══════════════════════════════════════════════════════════
   MKM Consultancy — Main Stylesheet
   mkmconsultancy.de
═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Variables ─────────────────────────────────────────── */
:root {
  --brand:       #1a3a5c;
  --brand-dark:  #0d2440;
  --gold:        #c8a96e;
  --gold-hover:  #d4b87a;
  --bg:          #f5f2ec;
  --surface:     #ffffff;
  --surface2:    #f9f7f4;
  --border:      #e0dbd0;
  --text:        #1a1a1a;
  --text2:       #555555;
  --text3:       #888888;
  --success:     #1a7a4a;
  --danger:      #c0392b;
  --warn:        #b07a00;
  --info:        #1a5a9a;
  --radius:      10px;
  --radius-lg:   14px;
  --shadow:      0 2px 12px rgba(0,0,0,.08);
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
a { color: var(--brand); }
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; }
input, select, textarea, button { font-family: inherit; }

/* ── Nav ───────────────────────────────────────────────── */
.nav {
  background: var(--brand); padding: 0 2rem; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.nav-logo { color: #fff; font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 700; text-decoration: none; }
.nav-logo span { color: var(--gold); }
.nav-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.nav-btn { background: transparent; border: 1.5px solid rgba(255,255,255,.3); color: #fff; padding: 6px 14px; border-radius: 7px; font-size: 13px; font-weight: 500; text-decoration: none; cursor: pointer; transition: background .15s; }
.nav-btn:hover { background: rgba(255,255,255,.1); }

/* ── Hero ──────────────────────────────────────────────── */
.hero { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff; padding: 4.5rem 2rem; text-align: center; }
.hero h1 { font-size: 2.6rem; margin-bottom: .7rem; }
.hero h1 span { color: var(--gold); }
.hero p { font-size: 1.05rem; opacity: .8; max-width: 540px; margin: 0 auto 2rem; line-height: 1.7; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Features / How it works ───────────────────────────── */
.features { padding: 3rem 2rem; max-width: 1100px; margin: 0 auto; }
.features h2, .how-it-works h2 { text-align: center; font-size: 1.7rem; color: var(--brand); margin-bottom: .4rem; }
.features-sub { text-align: center; color: var(--text2); margin-bottom: 2.5rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.feat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; transition: transform .2s, box-shadow .2s; }
.feat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feat-icon { font-size: 1.75rem; margin-bottom: .75rem; }
.feat-card h3 { font-size: .95rem; color: var(--brand); margin-bottom: .35rem; }
.feat-card p { font-size: 13px; color: var(--text2); line-height: 1.6; }

.how-it-works { background: var(--surface); border-top: 1px solid var(--border); padding: 3rem 2rem; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.step { text-align: center; }
.step-num { width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 1.3rem; display: flex; align-items: center; justify-content: center; margin: 0 auto .9rem; font-family: 'Playfair Display', serif; font-weight: 700; }
.step.step-gold .step-num, .step-num.gold { background: var(--gold); color: #1a1a1a; }
.step h3 { font-size: .95rem; color: var(--brand); margin-bottom: .3rem; }
.step p { font-size: 12px; color: var(--text2); }

/* ── Footer ────────────────────────────────────────────── */
.footer { background: var(--brand); color: rgba(255,255,255,.7); padding: 1.25rem 2rem; font-size: 13px; }
.footer a { color: var(--gold); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

/* ── Buttons ───────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 20px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; transition: all .15s; }
.btn:hover { background: var(--surface2); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: #1e4570; border-color: #1e4570; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #1a1a1a; }
.btn-gold:hover { background: var(--gold-hover); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { background: #15663d; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #a93226; }
.btn-outline { background: transparent; border: 1.5px solid rgba(255,255,255,.4); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.1); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }

/* ── Forms ─────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 11px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: .5px; }
.form-group input, .form-group select, .form-group textarea {
  border: 1.5px solid var(--border); border-radius: 8px; padding: 9px 12px;
  font-size: 14px; background: var(--surface2); color: var(--text); transition: border-color .2s; width: 100%;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--brand); background: #fff;
}
.form-group textarea { resize: vertical; }
.form-actions { display: flex; justify-content: flex-end; gap: 1rem; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.form-section-title { font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600; color: var(--brand); margin-bottom: 1.25rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border); }

/* ── Form card ─────────────────────────────────────────── */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; margin-bottom: 1.5rem; }

/* ── File upload ───────────────────────────────────────── */
.files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.file-upload-label {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 1.25rem .75rem;
  text-align: center; cursor: pointer; transition: all .2s; background: var(--surface2); gap: .35rem;
}
.file-upload-label:hover { border-color: var(--brand); background: #e8f0f8; }
.file-upload-label.has-file { border-color: var(--success); background: #f0faf5; }
.file-upload-label input[type=file] { display: none; }
.file-icon { font-size: 1.75rem; }
.file-upload-label strong { font-size: 12px; color: var(--brand); }
.file-status { font-size: 11px; color: var(--text3); }
.file-upload-label.has-file .file-status { color: var(--success); }

/* ── CAPTCHA ───────────────────────────────────────────── */
.captcha-row { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.captcha-eq { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: .5rem 1.25rem; font-size: 1.4rem; font-weight: 700; font-family: 'Playfair Display', serif; color: var(--brand); white-space: nowrap; }

/* ── Alerts ────────────────────────────────────────────── */
.alert { padding: .85rem 1.1rem; border-radius: 8px; font-size: 13px; margin-bottom: 1rem; display: flex; align-items: flex-start; gap: .6rem; line-height: 1.5; }
.alert-info    { background: #e8f0f8; color: #1a4a8a; border-left: 3px solid #1a4a8a; }
.alert-success { background: #d4edda; color: #155724; border-left: 3px solid #155724; }
.alert-danger  { background: #f8d7da; color: #721c24; border-left: 3px solid #721c24; }
.alert-warn    { background: #fff3cd; color: #856404; border-left: 3px solid #856404; }

/* ── Badges ────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-new, .badge-pending  { background: #e8f0f8; color: #1a5a9a; }
.badge-review               { background: #e8d5f5; color: #5a2d82; }
.badge-approved             { background: #d4edda; color: #155724; }
.badge-rejected             { background: #f8d7da; color: #721c24; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 600; background: #e8f0f8; color: var(--brand); }

/* ── Auth pages ────────────────────────────────────────── */
.auth-wrap { min-height: calc(100vh - 60px); display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2.5rem; width: 100%; max-width: 420px; box-shadow: var(--shadow); }
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo h2 { font-size: 1.4rem; color: var(--brand); margin-bottom: .25rem; }
.auth-logo p { font-size: 13px; color: var(--text2); }

/* ── Portal layout ─────────────────────────────────────── */
.portal-layout { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 0px); }
.sidebar { background: var(--brand); padding: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.sidebar-brand { color: #fff; font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 700; padding: 1.25rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-brand span { color: var(--gold); }
.sidebar-user { padding: 1.1rem 1.25rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--gold); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #1a1a1a; margin-bottom: .6rem; }
.su-name { color: #fff; font-size: 13px; font-weight: 500; }
.su-role { color: rgba(255,255,255,.5); font-size: 11px; }
.sidebar-nav { padding: .5rem 0; flex: 1; }
.snav-link { display: flex; align-items: center; gap: 10px; padding: 10px 1.25rem; color: rgba(255,255,255,.7); font-size: 14px; text-decoration: none; transition: all .15s; cursor: pointer; }
.snav-link:hover, .snav-link.active { background: rgba(255,255,255,.1); color: #fff; }
.snav-link.active { border-left: 3px solid var(--gold); }
.snav-link i { font-size: 16px; }
.notif-badge { margin-left: auto; background: #e74c3c; color: #fff; border-radius: 50%; width: 18px; height: 18px; font-size: 10px; display: inline-flex; align-items: center; justify-content: center; }
.sidebar-divider { height: 1px; background: rgba(255,255,255,.1); margin: .5rem 1.25rem; }
.portal-main { background: var(--bg); padding: 2rem; overflow-y: auto; min-height: 100vh; }

/* ── Portal tabs ───────────────────────────────────────── */
.ptab { display: none; }
.ptab.active { display: block; }
.page-header { margin-bottom: 1.75rem; }
.page-header h2 { font-size: 1.5rem; color: var(--brand); margin-bottom: .25rem; }
.page-header p { color: var(--text2); font-size: 13px; }
.page-banner { background: var(--brand); padding: 1.5rem 2rem; color: #fff; }
.page-banner h2 { font-size: 1.4rem; margin-bottom: .2rem; }
.page-banner p { opacity: .7; font-size: 13px; }

/* ── Cards ─────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.card-title { font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600; color: var(--brand); margin-bottom: 1.1rem; }

/* ── Stats row ─────────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; }
.stat-label { font-size: 11px; color: var(--text2); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; margin-bottom: .35rem; }
.stat-value { font-size: 1.75rem; font-weight: 700; font-family: 'Playfair Display', serif; color: var(--brand); }
.stat-value.green { color: var(--success); }
.stat-value.red   { color: var(--danger); }
.stat-value.amber { color: #c07a00; }
.stat-value.blue  { color: var(--info); }
.stat-value.gold  { color: var(--gold); }
.stat-sub { font-size: 11px; color: var(--text3); margin-top: .25rem; }

/* ── Progress bar ──────────────────────────────────────── */
.prog-wrap { background: var(--border); border-radius: 20px; height: 8px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--gold); border-radius: 20px; transition: width .5s ease; }

/* ── Data table ────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th { background: var(--surface2); padding: 9px 14px; text-align: left; font-size: 11px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid var(--border); }
.data-table tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface2); }

/* ── Document rows ─────────────────────────────────────── */
.doc-row { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.doc-row:last-child { border-bottom: none; }
.rejected-row { background: #fff8f8; }
.doc-info { flex: 1; min-width: 140px; }
.doc-name { font-size: 14px; font-weight: 500; }
.doc-meta, .doc-view-link { font-size: 12px; color: var(--text2); margin-top: 3px; }
.doc-view-link { color: var(--brand); text-decoration: underline; }
.doc-status { flex-shrink: 0; }
.doc-upload { flex-shrink: 0; }
.upload-btn-label { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 7px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 500; cursor: pointer; }
.upload-btn-label:hover { background: #1e4570; }
.doc-grid-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; }
.doc-mini { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem; display: flex; flex-direction: column; gap: .4rem; }
.doc-mini strong { font-size: 12px; color: var(--text); }
.doc-mini.approved { border-color: #b7dfc2; background: #f0faf5; }
.doc-mini.rejected { border-color: #f5c6cb; background: #fff5f5; }

/* ── Notifications ─────────────────────────────────────── */
.notif-item { display: flex; gap: .75rem; padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); }
.notif-item.unread { background: #f0f6ff; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex-shrink: 0; margin-top: .35rem; }
.notif-text { font-size: 13px; line-height: 1.5; }
.notif-time { font-size: 11px; color: var(--text3); margin-top: .3rem; }

/* ── Bar chart ─────────────────────────────────────────── */
.bar-chart { display: flex; align-items: flex-end; gap: 14px; height: 140px; padding-bottom: .25rem; }
.bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.bar-val { font-size: 12px; font-weight: 600; color: var(--text); }
.bar-col { width: 100%; border-radius: 4px 4px 0 0; transition: height .5s; }
.bar-lbl { font-size: 11px; color: var(--text2); }

/* ── Contract ready ────────────────────────────────────── */
.contract-ready { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; border-radius: var(--radius-lg); padding: 2rem; text-align: center; }
.contract-ready h3 { font-size: 1.3rem; margin-bottom: .5rem; }
.contract-ready p { opacity: .8; font-size: 14px; margin-bottom: 1.5rem; }

/* ── Danger zone ───────────────────────────────────────── */
.danger-zone { border-color: #f5c6cb; }

/* ── Spinner ───────────────────────────────────────────── */
.spinner { width: 56px; height: 56px; border: 6px solid rgba(255,255,255,.2); border-top-color: var(--gold); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 700px) {
  .portal-layout { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .hero h1 { font-size: 1.8rem; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

.approved-row { background:#f0faf5; }
.rejected-row { background:#fff8f8; }
