/* начало участка vvj_erp_css_full */
/* File: assets/css/vvj-erp.css */
/* Version: 3.7 */

/* Base typography */
.vvj-erp,
.vvj-erp * {
  font-family: Helvetica, Arial, sans-serif;
  box-sizing: border-box;
}

/* Full-width layout */
.vvj-erp {
  width: 100%;
  margin: 0;
  padding: 8px;
}

.vvj-erp-title { font-size: 18px; font-weight: 700; margin: 6px 0 10px 0; letter-spacing: 0.2px; }
.vvj-erp-title-small { font-size: 16px; margin: 0 0 10px 0; font-weight: 700; }
.vvj-erp-muted { color: #666; font-size: 13px; }

.vvj-erp-box { border: 1px solid #ddd; padding: 12px; margin: 12px 0; background: #fff; }
.vvj-erp-login-wrap, .vvj-erp-auftraege-wrap { font-family: Helvetica, Arial, sans-serif; }
.vvj-erp-login-box { max-width: 420px; margin: 30px auto; border: 1px solid #ddd; padding: 18px; background: #fff; }

.vvj-erp-form { display: block; }
.vvj-erp-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.vvj-erp-field { min-width: 220px; }
.vvj-erp-field-actions { min-width: 160px; }

.vvj-erp-label { display: block; font-size: 12px; color: #444; margin: 8px 0 4px; }
.vvj-erp-input, .vvj-erp-select, .vvj-erp-textarea { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; }

.vvj-erp-btn { display:inline-block; padding: 9px 12px; border: 1px solid #333; background: #fff; cursor: pointer; border-radius: 4px; font-weight: 700; font-size: 12px; text-decoration:none; white-space: nowrap; }
.vvj-erp-btn:hover { background:#f5f5f5; }
.vvj-erp-btn-small { padding: 6px 8px; font-size: 12px; }
.vvj-erp-btn-danger { border-color: #a00; color: #a00; }

.vvj-erp-link { text-decoration: none; border-bottom: 1px solid #333; }

.vvj-erp-alert { padding: 10px; border-radius: 4px; margin: 10px 0; }
.vvj-erp-alert-error { border: 1px solid #a00; color: #a00; background: #fff7f7; }
.vvj-erp-alert-success { border: 1px solid #0a6; color: #0a6; background: #f3fff9; }
.vvj-erp-alert-info { border: 1px solid #2a6; color: #2a6; background: #f6fffb; }

.vvj-erp-auftraege-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.vvj-erp-sub { color: #666; font-size: 13px; margin-top: 2px; }

/* Tabs */
.vvj-erp-tabs { margin: 12px 0; }
.vvj-erp-tabs > input { display: none; }
.vvj-erp-tabs > label { display: inline-block; padding: 8px 10px; border: 1px solid #ddd; margin-right: 6px; cursor: pointer; border-radius: 4px; background: #f7f7f7; }
#vvj-erp-tab-filter:checked + label,
#vvj-erp-tab-form:checked + label { background: #fff; border-color: #333; }
#vvj-erp-panel-filter,
#vvj-erp-panel-form { display: none; margin-top: 10px; }
#vvj-erp-tab-filter:checked ~ #vvj-erp-panel-filter { display: block; }
#vvj-erp-tab-form:checked ~ #vvj-erp-panel-form { display: block; }

/* Scroll wrapper + min width (mobile safe) */
.vvj-erp-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
.vvj-erp-minwidth { min-width: 1100px; }

/* Table (MVP style) */
.vvj-erp-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  background: #fff;
}

.vvj-erp-table th,
.vvj-erp-table td {
  border: 1px solid #e6e6e6;
  padding: 8px 10px;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.25;
}

.vvj-erp-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fafafa;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2px;
}

.vvj-erp-table tbody tr:hover { background: #fcfcfc; }
.vvj-erp-actions-cell { white-space: nowrap; }
.vvj-erp-missing-due { background: #ffe5e5 !important; }

/* Zahnschema responsive */
.vvj-erp-zahnschema { display: grid; gap: 10px; }
.vvj-erp-zahn-block { border: 1px solid #ddd; padding: 10px; border-radius: 4px; }
.vvj-erp-zahn-block-title { font-weight: 700; margin-bottom: 8px; }
.vvj-erp-zahn-grid { display: grid; grid-template-columns: repeat(8, minmax(120px, 1fr)); gap: 8px; }
@media (max-width: 1100px) { .vvj-erp-zahn-grid { grid-template-columns: repeat(4, minmax(120px, 1fr)); } }
@media (max-width: 600px)  { .vvj-erp-zahn-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); } }
.vvj-erp-zahn-label { font-size: 12px; color: #444; margin-bottom: 3px; }

/* Calendar (grid week layout like MVP) */
.vvj-erp-calendar {
  width: 100%;
  background: #fff;
  border: 1px solid #e6e6e6;
}

.vvj-erp-calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #fafafa;
  border-bottom: 1px solid #e6e6e6;
}

.vvj-erp-cal-dayhead {
  padding: 8px 10px;
  border-right: 1px solid #e6e6e6;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.vvj-erp-cal-dayhead:last-child { border-right: none; }

.vvj-erp-calendar-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid #e6e6e6;
}

.vvj-erp-calendar-week:last-child { border-bottom: none; }

.vvj-erp-cal-day {
  min-height: 120px;
  padding: 8px 10px;
  border-right: 1px solid #e6e6e6;
}

.vvj-erp-cal-day:last-child { border-right: none; }

.vvj-erp-cal-date {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 8px;
  white-space: nowrap;
}

.vvj-erp-cal-card {
  border: 1px solid #e6e6e6;
  padding: 8px 8px;
  margin-bottom: 8px;
  background: #fff;
}

.vvj-erp-cal-card:last-child { margin-bottom: 0; }

.vvj-erp-cal-card-main {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vvj-erp-cal-card-sub {
  font-size: 12px;
  line-height: 1.25;
  margin-top: 4px;
  opacity: 0.85;
}

.vvj-erp-cal-card-accent {
  border-left: 4px solid #e6e6e6;
  padding-left: 8px;
}

/* Responsive safety */
@media (max-width: 900px) {
  .vvj-erp { padding: 6px; }
  .vvj-erp-table th, .vvj-erp-table td { padding: 7px 8px; }
  .vvj-erp-minwidth { min-width: 1100px; }
}

/* Print modes */
@media print {
  @page { size: A4 landscape; margin: 10mm; }

  body * { visibility: hidden !important; }

  body.vvj-print-table .vvj-erp-print-table,
  body.vvj-print-table .vvj-erp-print-table * { visibility: visible !important; }

  body.vvj-print-table .vvj-erp-print-table {
    position: absolute; left: 0; top: 0; width: 100%;
  }

  body.vvj-print-calendar .vvj-erp-print-calendar,
  body.vvj-print-calendar .vvj-erp-print-calendar * { visibility: visible !important; }

  body.vvj-print-calendar .vvj-erp-print-calendar {
    position: absolute; left: 0; top: 0; width: 100%;
  }

  .vvj-erp-table thead { display: table-header-group; }
  .vvj-erp-cal-card { break-inside: avoid; page-break-inside: avoid; }
}

/* конец участка vvj_erp_css_full */
