/* ============================================
   PartnerPlus CRM – Komponenten
   ============================================ */

/* === BUTTONS === */
.btn {
  display:inline-block;
  font-weight:600;
  padding:0.6rem 1.2rem;
  border-radius:var(--radius);
  border:none;
  cursor:pointer;
  text-decoration:none;
  transition:background .2s, color .2s;
}
.btn-primary {
  background:var(--vk-gold);
  color:#fff;
}
.btn-primary:hover { background:var(--vk-gold-dark); }

.btn-secondary {
  background:var(--vk-dark);
  color:#fff;
}
.btn-secondary:hover { background:#000; }

.btn-ghost {
  background:transparent;
  border:1px solid var(--vk-border);
  color:var(--vk-dark);
}
.btn-ghost:hover { background:var(--vk-gray-light); }

.btn-success { background:#47a64a; color:#fff; }
.btn-success:hover { background:#3e9442; }

.btn-danger { background:#d9534f; color:#fff; }
.btn-danger:hover { background:#c9302c; }

/* === INPUTS / FORM === */
.form-group { margin-bottom:1rem; }
label { font-weight:600; display:block; margin-bottom:4px; }
input[type=text], input[type=email], input[type=password],
textarea, select {
  width:100%;
  padding:0.7rem 0.9rem;
  border:1px solid var(--vk-border);
  border-radius:var(--radius);
  font-size:15px;
  background:#fff;
  box-sizing:border-box;
}
input:focus, textarea:focus, select:focus {
  outline:2px solid var(--vk-gold);
}
.checkbox {
  display:flex; align-items:center; gap:8px;
}
.checkbox input { width:auto; }

/* Toggle Switch */
.switch {
  position:relative; display:inline-block;
  width:46px; height:24px;
}
.switch input {opacity:0; width:0; height:0;}
.slider {
  position:absolute; cursor:pointer;
  top:0; left:0; right:0; bottom:0;
  background:#ccc; transition:.3s; border-radius:24px;
}
.slider:before {
  position:absolute; content:"";
  height:18px; width:18px;
  left:3px; bottom:3px;
  background:white; transition:.3s; border-radius:50%;
}
input:checked + .slider { background:var(--vk-gold); }
input:checked + .slider:before { transform:translateX(22px); }

/* === BADGES === */
.badge {
  display:inline-block;
  padding:0.25rem 0.6rem;
  border-radius:8px;
  font-size:13px;
  font-weight:600;
  color:#fff;
}
.badge-info { background:#5bc0de; }
.badge-success { background:#47a64a; }
.badge-warning { background:var(--vk-gold); }
.badge-danger { background:#d9534f; }
.badge-dark { background:var(--vk-dark); }

/* === TABS === */
.tabs {
  display:flex;
  border-bottom:2px solid var(--vk-border);
  margin-bottom:1rem;
}
.tabs a {
  padding:0.7rem 1.2rem;
  text-decoration:none;
  color:var(--vk-dark);
  font-weight:600;
  border-bottom:3px solid transparent;
}
.tabs a.active {
  border-bottom-color:var(--vk-gold);
  color:var(--vk-gold);
}

/* === PROGRESS BAR === */
.progress {
  background:#eee;
  border-radius:10px;
  height:12px;
  width:100%;
  overflow:hidden;
}
.progress .bar {
  height:100%;
  background:var(--vk-gold);
  width:0;
  transition:width .4s ease;
}

/* === Medienübersicht === */
.media-grid{
  display:flex; flex-wrap:wrap; gap:14px;
}
.media-item{
  background:#fff;
  border:1px solid var(--vk-border);
  border-radius:10px;
  width:160px;
  padding:8px;
  text-align:center;
  position:relative;
  box-shadow:0 2px 8px rgba(0,0,0,0.05);
}
.media-item img{
  max-width:100%;
  height:100px;
  object-fit:cover;
  border-radius:6px;
}
.media-icon{
  font-size:48px;
  line-height:100px;
  color:var(--vk-gold);
}
.media-actions{
  margin-top:8px;
}
.btn-sm{
  font-size:13px;
  padding:4px 8px;
  border-radius:6px;
}

/* === Auftragsübersicht === */
.orders-grid{
  display:flex; flex-direction:column; gap:20px;
}
.order-card{
  background:#fff;
  border-radius:14px;
  box-shadow:0 3px 12px rgba(0,0,0,.1);
  overflow:hidden;
}
.order-head{
  background:var(--vk-dark);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 16px;
}
.order-id{font-size:12px;opacity:.7;}
.order-addr{flex:1;text-align:center;}
.order-addr .street{font-weight:700;}
.order-addr .city{font-size:13px;opacity:.9;}
.order-link a{text-decoration:none;color:var(--vk-gold);font-size:18px;}

.order-section{
  border-top:1px solid var(--vk-border);
  padding:10px 16px;
  font-size:14px;
}
.label{font-weight:700;margin-bottom:4px;}
.progress{
  width:100%;height:10px;border-radius:6px;
  background:#eee;overflow:hidden;margin:4px 0;
}
.progress .bar{height:100%;transition:width .3s ease;}
.status-label{font-weight:600;margin-top:4px;}

.todo-list{margin:0;padding-left:18px;}
.todo-list li{list-style:none;line-height:1.4;}
.todo-list li::before{content:'› ';color:var(--vk-gold);font-weight:700;}

.order-section.seller{display:flex;align-items:center;justify-content:space-between;}
.seller-name a{color:var(--vk-gold);font-weight:600;text-decoration:none;}
.seller-actions{display:flex;gap:6px;}
.btn-icon{
  background:var(--vk-gold);
  color:#fff;
  padding:6px 8px;
  border-radius:8px;
  font-size:15px;
  text-decoration:none;
}
.btn-icon:hover{opacity:.85;}

.pagination{
  text-align:center;margin-top:10px;
}
.pagination button{
  background:transparent;border:none;font-size:18px;color:var(--vk-gold);cursor:pointer;
}
.pagination span{margin:0 8px;}

.todo-list li.done {
  text-decoration: line-through;
  opacity: .6;
}


/* Medienbereich */
.media-grid{display:flex;flex-wrap:wrap;gap:14px;}
.media-item{background:#fff;border:1px solid var(--vk-border);border-radius:10px;width:160px;padding:8px;text-align:center;position:relative;box-shadow:0 2px 8px rgba(0,0,0,0.05);}
.media-item img{max-width:100%;height:100px;object-fit:cover;border-radius:6px;}
.media-icon{font-size:48px;line-height:100px;color:var(--vk-gold);}
.media-actions{margin-top:8px;display:flex;gap:4px;justify-content:center;}

/* Erfolgsmeldung (BackOffice) */
.alert-success {
  background-color: #e6f9ed;
  color: #256b38;
  border: 1px solid #b7ebc0;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 15px;
  font-weight: 600;
  animation: fadeIn 0.4s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

@keyframes fadeIn {
  from {opacity: 0; transform: translateY(-5px);}
  to {opacity: 1; transform: translateY(0);}
}

/* === Toast Notification (zentriert oben) === */
.toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translate(-50%, -30px);
  background: #1b4332;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 9999;
  min-width: 280px;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* === Farb- und Typo-Variablen (Fallbacks, falls noch nicht gesetzt) === */
:root{
  --vk-bg:#f4f5f7;
  --vk-panel:#ffffff;
  --vk-text:#1d1f23;
  --vk-muted:#6b7280;
  --vk-border:#e5e7eb;
  --vk-gold:#9b774d;         /* Primär (Buttons, Icons) */
  --vk-gold-600:#8a6a44;
  --vk-gold-700:#7a5f3d;
  --vk-dark:#2b2f36;
  --vk-shadow:0 4px 14px rgba(0,0,0,.08);
  --vk-radius:14px;
}

/* === Page basics === */
body{background:var(--vk-bg); color:var(--vk-text);}
h2{font-size:22px; font-weight:800; letter-spacing:.3px; margin:10px 0 16px;}
.card{
  background:var(--vk-panel); border:1px solid var(--vk-border);
  border-radius:var(--vk-radius); box-shadow:var(--vk-shadow);
  padding:16px; margin:14px 0;
}

/* === Buttons === */
.btn{display:inline-flex; align-items:center; gap:8px; font-weight:700; border-radius:12px; padding:10px 14px; border:1px solid transparent; text-decoration:none;}
.btn-primary{background:var(--vk-gold); color:#fff;}
.btn-primary:hover{background:var(--vk-gold-600);}
.btn-secondary{background:#fff; color:var(--vk-gold); border-color:var(--vk-gold); }
.btn-secondary:hover{background:#fff7ed;}
.btn-ghost{background:transparent; color:var(--vk-gold);}

/* === Filter & Suche === */
.filter-form{
  display:flex; flex-wrap:wrap; align-items:center; gap:10px;
  background:var(--vk-panel); border:1px solid var(--vk-border); border-radius:var(--vk-radius);
  padding:10px 12px; margin:10px 0 16px;
}
.filter-form input[type="text"]{
  flex:1 1 260px; height:42px; border:1px solid var(--vk-border);
  border-radius:12px; padding:0 12px; outline:none; background:#fff;
}
.filter-form button{height:42px; padding:0 14px; border-radius:12px; border:1px solid var(--vk-border); background:#fff;}
.filter-radios{display:flex; flex-wrap: wrap; gap:12px;}
.filter-radios label{display:flex; align-items:center; gap:6px; font-weight:600; white-space: nowrap; color:var(--vk-muted);}
.filter-radios input[type="radio"]{
  appearance:none; width:18px; height:18px; border:2px solid var(--vk-gold); border-radius:50%; position:relative;
}
.filter-radios input[type="radio"]:checked{background:var(--vk-gold);}

/* === Kontaktkarten-Liste === */
.contact-card{padding:14px 14px 10px;}
.contact-card h3{font-size:16px; font-weight:800; margin:0 0 6px;}
.contact-meta{display:flex; flex-wrap:wrap; gap:10px; color:var(--vk-muted); font-size:14px;}
.k-meta{display:flex; align-items:center; gap:6px;}
.k-actions{display:flex; gap:8px; margin-top:10px;}
.k-actions .btn{height:36px; padding:0 12px; border-radius:10px; font-weight:700;}
.k-badge{
  font-size:12px; font-weight:800; color:#fff; background:var(--vk-gold);
  padding:4px 8px; border-radius:999px; display:inline-flex; align-items:center; gap:6px;
}

/* optional: Trenner zwischen Einträgen */
.contact-card + .contact-card{margin-top:10px;}

/* === Formular (create/edit) === */
.form-wrap{max-width:560px;}
.form-grid{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
.form-grid .full{grid-column:1 / -1;}
label{font-size:13px; font-weight:700; color:var(--vk-muted); display:block; margin:10px 0 6px;}
input[type="text"], input[type="email"], select{
  width:100%; height:44px; border:1px solid var(--vk-border); border-radius:12px; padding:0 12px; background:#fff;
}
textarea{width:100%; min-height:110px; border:1px solid var(--vk-border); border-radius:12px; padding:10px 12px;}
input:focus, select:focus, textarea:focus{outline:none; border-color:var(--vk-gold); box-shadow:0 0 0 3px rgba(155,119,77,.15);}

/* Anrede als Pill-Radios */
.radio-group{display:flex; gap:14px; margin-bottom:8px;}
.radio-group input[type="radio"]{appearance:none; position:absolute; opacity:0;}
.radio-group label{
  position:relative; padding:8px 14px; border:1px solid var(--vk-border); border-radius:999px;
  cursor:pointer; user-select:none; font-weight:700; color:var(--vk-text); background:#fff;
}
.radio-group input[type="radio"]:checked + span,
.radio-group label:has(input[type="radio"]:checked){
  background:#fff7ed; border-color:var(--vk-gold); color:var(--vk-gold);
}

/* WhatsApp consent checkbox */
.form-check{display:flex; align-items:center; gap:10px; margin-top:6px; color:var(--vk-muted); font-weight:600;}
.form-actions{margin-top:16px;}

/* === Pagination (einfach) === */
.pagination{display:flex; align-items:center; justify-content:center; gap:12px; margin:14px 0;}
.pagination .page-btn{
  width:38px; height:38px; border-radius:10px; border:1px solid var(--vk-border); background:#fff;
}
.pagination .range{font-weight:700; color:var(--vk-muted);}

/* ToDos */
.todo-list ul,
.card ul {
  list-style: disc;
  margin: 8px 0 0 22px;
  padding: 0;
  color: #333;
}

.todo-list li,
.card li {
  margin: 4px 0;
  line-height: 1.4;
}

.todo-list small,
.card small {
  color: #777;
  font-size: 0.9em;
}

/* Löschen button */
.btn-danger {
  background: #b91c1c;
  color: #fff;
  border: 1px solid #991b1b;
}
.btn-danger:hover {
  background: #991b1b;
}



/* Filter-Container */
.filter-form {
    background: var(--vk-panel);
    border: 1px solid var(--vk-border);
    border-radius: var(--vk-radius);
    padding: 12px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
}

/* Tag-Wrap */
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

}

/* iOS-Pill Style Tags */
.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 16px;
    min-width: 120px;

    background: #fff;
    border: 2px solid #d0d0d0;
    border-radius: 32px;

    cursor: pointer;
    user-select: none;

    transition: 
        background 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        transform 0.2s ease;
}

/* Hover in Gold */
.tag:hover {
    background: #f1e3c0;
    border-color: var(--vk-gold);
}

/* Radio unsichtbar */
.tag input {
    display: none;
}

/* Standard-Text */
.tag span {
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Badge-Styling */
.badge {
    font-size: 12px;
    font-weight: bold;
    color: #666;
}

/* SMOOTH ACTIVE-ANIMATION */
.active-tag {
    background: var(--vk-gold) !important;
    border-color: var(--vk-gold) !important;
    color: #FFF !important;

    transform: scale(1.03);
    box-shadow: 0 0 8px rgba(0,0,0,0.08);

    transition: all 0.2s ease;
}

/* Badge in aktiven Tag */
.active-tag .badge {
    color: #000;
}
