.vwt-wrap select,
.vwt-wrap input[type="text"],
.vwt-wrap input[type="date"] {
    -webkit-appearance: auto !important;
    appearance: auto !important;
    display: inline-block !important;
    float: none !important;
}

.vwt-wrap .vwt-two-col { display: flex; gap: 30px; margin-top: 15px; }
.vwt-wrap .vwt-col-form { flex: 0 0 420px; }
.vwt-wrap .vwt-col-list { flex: 1; }

.vwt-status { padding: 3px 8px; border-radius: 3px; font-size: 12px; font-weight: 600; display: inline-block; }
.vwt-status-entwurf { background: #f0f0f1; color: #50575e; }
.vwt-status-bestaetigt { background: #d5e8ff; color: #0a4b8c; }
.vwt-status-ausgeliefert { background: #fff2cc; color: #8a6d00; }
.vwt-status-zurueck { background: #e6f4ea; color: #1e6a34; }
.vwt-status-abgeschlossen { background: #1e6a34; color: #fff; }
.vwt-status-storniert { background: #f8d7da; color: #842029; }

.vwt-product-search-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vwt-search-hinweis { color: #b32d2e; font-size: 12px; margin: 4px 0; }

.vwt-category-dropdown { position: relative; display: inline-block; }
.vwt-category-btn { display: flex !important; align-items: center; gap: 6px; min-width: 200px; justify-content: space-between; text-align: left; }
.vwt-caret { font-size: 10px; opacity: .6; }
.vwt-category-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    width: 340px;
    max-height: 360px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccd0d4;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    margin-top: 2px;
}
.vwt-category-option {
    padding: 7px 14px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid #f4f4f4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vwt-category-option:hover { background: #f0f6fc; }
.vwt-cat-count { color: #888; }

.vwt-search-results {
    position: relative;
    max-width: 600px;
    border: 1px solid #ccd0d4;
    background: #fff;
    max-height: 320px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
}
.vwt-search-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f1;
}
.vwt-search-row:hover { background: #f0f6fc; }
.vwt-search-row.vwt-knapp-verfuegbar { background: #fff8e5; }
.vwt-search-row.vwt-knapp-verfuegbar:hover { background: #fff1cc; }
.vwt-search-row.vwt-nicht-verfuegbar { background: #fdecea; }
.vwt-search-row.vwt-nicht-verfuegbar:hover { background: #fbd9d5; }
.vwt-search-row img { width: 40px; height: 40px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.vwt-search-meta span { color: #666; font-size: 12px; }
.vwt-search-empty { padding: 10px; color: #666; }

#vwt-items-table { max-width: 100%; margin-top: 10px; }
#vwt-items-table td { vertical-align: top; }
.vwt-item-row-eigen td,
.vwt-item-desc-row td { background: #f6f8fb; border-bottom: none; box-shadow: inset 3px 0 0 #2a5a8c; }
.vwt-item-desc-row td { padding-top: 0; padding-bottom: 10px; border-bottom: 1px solid #e2e6ec; }
.vwt-item-row-eigen:hover td,
.vwt-item-desc-row:hover td { background: #f0f3f8; }
.vwt-beschreibung-label { display: block; font-size: 11px; color: #5a6a7a; margin-bottom: 3px; }
.vwt-item-desc-row .vwt-beschreibung { width: 100%; box-sizing: border-box; margin-top: 0; }
.vwt-menge { width: 70px; box-sizing: border-box; }
.vwt-zeilensumme { font-weight: 600; }
.vwt-drag-handle { cursor: move; color: #999; text-align: center; user-select: none; }
.vwt-drag-handle:hover { color: #2271b1; }
.vwt-heading-row td { background: #f6f7f7; }
.vwt-heading-row .vwt-heading-input { font-weight: 700; font-size: 14px; width: 100%; border: none; background: transparent; box-shadow: none; }
.vwt-heading-row .vwt-heading-input:focus { box-shadow: 0 0 0 1px #2271b1; background: #fff; }
#vwt-items-body tr.ui-sortable-helper { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
#vwt-items-body .ui-sortable-placeholder { visibility: visible !important; background: #e5f2ff; border: 1px dashed #2271b1; height: 40px; }

/* ---- Zwei-Spalten-Layout: Produktsuche links, Angebots-Vorschau rechts ---- */
.vwt-editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
    margin-top: 10px;
}
.vwt-editor-search-col, .vwt-editor-preview-col {
    background: #fbfbfb;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    padding: 14px 16px;
}
.vwt-editor-preview-col h3 { margin-top: 0; }
.vwt-editor-preview-col #vwt-items-table { margin-top: 6px; font-size: 13px; }
.vwt-search-results-static {
    position: relative;
    max-height: 420px;
}
.vwt-gesamtsumme {
    text-align: right;
    font-weight: 700;
    font-size: 16px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #ddd;
}
@media (max-width: 1000px) {
    .vwt-editor-grid { grid-template-columns: 1fr; }
}

.vwt-repeat-row { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.vwt-repeat-row textarea, .vwt-repeat-row input[type="text"] {
    flex: 1;
    font-family: inherit;
    font-size: 13px;
    padding: 6px 8px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
}
.vwt-repeat-row .vwt-remove-repeat-row { color: #b32d2e; font-size: 16px; padding: 4px 6px; flex-shrink: 0; }
.vwt-repeat-row .vwt-leistungstag-uebernehmen { color: #2a5a8c; font-size: 12px; white-space: nowrap; padding: 4px 6px; flex-shrink: 0; align-self: center; }
.vwt-uebernahme-hinweis { background: #eef3f8; border: 1px solid #cdd8e3; border-radius: 6px; padding: 8px 10px; margin-bottom: 10px; font-size: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vwt-uebernahme-hinweis .button-link { color: #b32d2e; flex-shrink: 0; }
.vwt-ap-radio { display: flex !important; align-items: center; flex-shrink: 0; }
.vwt-ap-radio input { width: auto !important; margin: 0; }

.vwt-leistungstag-felder { display: grid; grid-template-columns: 150px 110px 110px 1fr; gap: 8px; }
.vwt-leistungstag-felder input { width: 100%; box-sizing: border-box; font-family: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid #8c8f94; border-radius: 4px; }
@media (max-width: 700px) { .vwt-leistungstag-felder { grid-template-columns: 1fr 1fr; } }

.vwt-kategorien-box { margin-top: 24px; padding-top: 16px; border-top: 1px solid #e2e2e2; max-width: 640px; }
.vwt-kategorien-box h3 { margin: 0 0 8px; }
.vwt-kat-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.vwt-kat-row input[type="text"] { flex: 1; padding: 4px 8px; }
.vwt-kat-btn { padding: 5px 10px; border: 1px solid #8c8f94; border-radius: 4px; background: #f6f7f7; cursor: pointer; font-size: 12px; }
.vwt-kat-btn:hover { background: #eee; }
.vwt-kat-delete { color: #b32d2e; text-decoration: none; padding: 4px 6px; flex-shrink: 0; }
.vwt-kat-row-neu { margin-top: 10px; }
.vwt-kat-notice { padding: 8px 10px; border-radius: 4px; margin-bottom: 10px; font-size: 13px; }
.vwt-kat-notice-ok { background: #eafaf0; color: #1c6b3a; }
.vwt-kat-notice-fehler { background: #fdecea; color: #a02622; }
.vwt-lieferblock-titel-wahl { display: flex; gap: 8px; align-items: center; margin: -6px 0 10px; max-width: 420px; }
.vwt-lieferblock-titel-wahl select, .vwt-lieferblock-titel-wahl input[type="text"] { flex: 1; }
.vwt-logo-galerie { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.vwt-logo-galerie-item { position: relative; border: 1px solid #e2e2e2; border-radius: 6px; padding: 8px; text-align: center; width: 130px; background: #fff; }
.vwt-logo-galerie-item img { max-width: 100%; max-height: 50px; display: block; margin: 0 auto 4px; }
.vwt-logo-galerie-item span { display: block; font-size: 11px; color: #666; word-break: break-all; }
.vwt-logo-galerie-item .vwt-kat-delete { position: absolute; top: 2px; right: 4px; }
.vwt-ab-row .vwt-ab-label { flex: 2; }
.vwt-ab-row .vwt-ab-menge, .vwt-ab-row .vwt-ab-suffix { flex: 1; min-width: 0; }
@media (max-width: 700px) { .vwt-ab-row { flex-wrap: wrap; } .vwt-ab-row .vwt-ab-label, .vwt-ab-row .vwt-ab-menge, .vwt-ab-row .vwt-ab-suffix { flex: 1 1 100%; } }

.vwt-doc-box { border: 1px solid #ccd0d4; background: #fff; padding: 15px 20px; margin-top: 15px; max-width: 1100px; }

/* ---- PDF-Anhänge (Angebot + Positionen) ---- */
.vwt-anh-block { margin: 14px 0 20px; padding-bottom: 14px; border-bottom: 1px solid #eee; }
.vwt-anh-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.vwt-anh-titel { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: #444; }
.vwt-anh-liste { list-style: none; margin: 0 0 10px; padding: 0; }
.vwt-anh-liste li { padding: 5px 0; font-size: 13px; }
.vwt-anh-meta { color: #888; font-size: 12px; }
.vwt-anh-beschreibung { color: #555; }
.vwt-anh-loeschen { color: #b32d2e; margin-left: 10px; font-size: 12px; }
.vwt-anh-leer { color: #888; font-size: 13px; margin: 0 0 10px; }
.vwt-anh-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vwt-anh-form input[type="file"] { font-size: 12px; }
.vwt-anh-beschreibung-input { flex: 1; min-width: 180px; padding: 6px 8px; font-size: 13px; border: 1px solid #8c8f94; border-radius: 4px; }
.vwt-anh-upload-btn { background: #2a5a8c; color: #fff; border: none; border-radius: 4px; padding: 7px 14px; cursor: pointer; font-size: 12px; }
.vwt-anh-upload-btn:hover { opacity: .85; }
.vwt-anh-hinweis { margin: 6px 0 0; font-size: 11px; color: #999; }

/* ---- Kalender: Umschalter Monat/Liste ---- */
.vwt-kalender-umschalter {
    display: inline-flex;
    background: #f0f0f1;
    border-radius: 8px;
    padding: 4px;
    margin: 14px 0 20px;
    gap: 2px;
}
.vwt-kalender-umschalter a {
    padding: 7px 16px;
    border-radius: 6px;
    text-decoration: none;
    color: #50575e;
    font-size: 13px;
    font-weight: 600;
}
.vwt-kalender-umschalter a.is-active { background: #fff; color: #1d2327; box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* ---- Kalender: Monatsnavigation ---- */
.vwt-kalender-nav { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.vwt-kalender-nav h2 { margin: 0; font-size: 20px; font-weight: 700; min-width: 180px; text-align: center; }
.vwt-kalender-nav-btn {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: #f6f7f7;
    border: 1px solid #e2e2e2;
    color: #1d2327;
    text-decoration: none;
    font-size: 16px;
}
.vwt-kalender-nav-btn:hover { background: #eef3f8; border-color: #c3d4e5; }

/* ---- Kalender: Monatsraster ---- */
.vwt-kalender-tabelle {
    width: 100%;
    border-collapse: separate;
    border-spacing: 5px;
    table-layout: fixed;
}
.vwt-kalender-tabelle th {
    background: transparent;
    padding: 6px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    color: #8a8f98;
    text-transform: uppercase;
    border: none;
}
.vwt-kalender-tag, .vwt-kalender-leer {
    border: 1px solid #e9eaec;
    border-radius: 10px;
    vertical-align: top;
    height: 96px;
    padding: 6px;
    background: #fff;
    transition: box-shadow .15s ease;
}
.vwt-kalender-tag:hover { box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.vwt-kalender-leer { background: #fbfbfc; border-style: dashed; }
.vwt-kalender-heute { background: #f3f9ff; border-color: #a9d0f5; border-width: 1.5px; }
.vwt-kalender-tagnr { font-size: 12px; font-weight: 700; color: #6b7280; margin-bottom: 4px; }
.vwt-kalender-heute .vwt-kalender-tagnr { color: #1868c1; }
.vwt-kalender-badge {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    padding: 3px 6px;
    margin-bottom: 3px;
    border-radius: 5px;
    background: #f0f0f1;
    color: #1d2327;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform .1s ease;
}
.vwt-kalender-badge:hover { transform: translateX(1px); filter: brightness(0.95); }
.vwt-kalender-badge.vwt-status-bestaetigt { background: #d5e8ff; color: #0a4b8c; }
.vwt-kalender-badge.vwt-status-ausgeliefert { background: #fff2cc; color: #8a6d00; }
.vwt-kalender-badge.vwt-status-zurueck { background: #e6f4ea; color: #1e6a34; }
.vwt-kalender-badge.vwt-status-abgeschlossen { background: #1e6a34; color: #fff; }

/* ---- Kalender: Listenansicht ---- */
.vwt-kalender-liste { width: 100%; border-collapse: collapse; }
.vwt-kalender-liste th {
    text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 700;
    color: #8a8f98; text-transform: uppercase; letter-spacing: .04em;
    border-bottom: 2px solid #eee;
}
.vwt-kalender-liste td { padding: 11px 12px; border-bottom: 1px solid #f0f0f1; font-size: 14px; }
.vwt-kalender-liste tbody tr:hover { background: #fafbfc; }
.vwt-kalender-liste a { text-decoration: none; font-weight: 600; }
.vwt-kalender-punkt {
    display: inline-block; width: 12px; height: 12px; border-radius: 50%;
    background: #ccc;
}
.vwt-kalender-punkt.vwt-status-bestaetigt { background: #2271b1; }
.vwt-kalender-punkt.vwt-status-ausgeliefert { background: #cf9a00; }
.vwt-kalender-punkt.vwt-status-zurueck { background: #1e6a34; }
.vwt-kalender-punkt.vwt-status-abgeschlossen { background: #1e6a34; }

@media (max-width: 900px) {
    .vwt-kalender-tag, .vwt-kalender-leer { height: 64px; }
    .vwt-kalender-tabelle th { font-size: 9px; }
    .vwt-kalender-nav h2 { font-size: 16px; min-width: auto; }
}
.vwt-doc-box a.button { margin: 4px 6px 4px 0; }

/* Gemeinsame Hinweis-Boxen + Tabelle für Versand-Archiv/Storno - bewusst
   eigene Klassen statt WP-Core-Klassen ("notice", "widefat"), da diese nur
   im wp-admin verfügbar sind, dieses Stylesheet aber sowohl im Backend
   als auch (als Abhängigkeit von frontend.css) im Frontend-Tool geladen wird. */
.vwt-notice { border-radius: 4px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; }
.vwt-notice-erfolg { background: #edfaef; border: 1px solid #68de7c; }
.vwt-notice-fehler { background: #fbeaea; border: 1px solid #e08a8a; color: #8a2424; }
.vwt-tabelle { width: 100%; border-collapse: collapse; margin-bottom: 12px; font-size: 13px; }
.vwt-tabelle th, .vwt-tabelle td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #eee; }
.vwt-tabelle thead th { background: #f6f7f7; font-weight: 600; border-bottom: 2px solid #ddd; }
.vwt-tabelle tbody tr:nth-child(even) { background: #fafbfc; }
.vwt-tabelle-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.vwt-btn-mini { white-space: nowrap; padding: 5px 10px; font-size: 12px; border: 1px solid #c3c4c7; background: #f6f7f7; border-radius: 3px; cursor: pointer; }
.vwt-btn-mini:hover { background: #f0f0f1; }
