
.venue-dashboard {
  padding: 24px;
  background: var(--bg-page);
  min-height: 100%;
  box-sizing: border-box;
  font-family: var(--app-font-family);
  padding-top: 0px;
}

.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.dash-title {
  h2 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
  }
}

.dash-subtitle {
  font-size: 13px;
  color: var(--text-tertiary);
}

.btn-add-venue {
  background: var(--button-primary-bg-default);
  color: var(--button-primary-text-default);
  border: 1px solid var(--button-primary-border-default);
  border-radius: 6px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;

  &:hover  { background: var(--button-primary-bg-hover); }
  &:active { background: var(--button-primary-bg-active); }
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom:15px;

  @media (max-width: 700px) { grid-template-columns: 1fr; }
}

.stat-card {
  background: var(--bg-surface);
  border-radius: 10px;
  padding: 20px 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  mat-icon { font-size: 22px; width: 22px; height: 22px; }

  &.stat-icon-rooms    { background: var(--category-bg-alpha);  color: var(--category-text-alpha); }
  &.stat-icon-virtual  { background: var(--category-bg-beta);   color: var(--category-text-beta);  }
  &.stat-icon-dojo     { background: var(--category-bg-delta);  color: var(--category-text-delta); }
  &.stat-icon-external { background: var(--category-bg-gamma);  color: var(--category-text-gamma); }
}

.stat-info {
  .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
  }

  .stat-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--text-tertiary);
    text-transform: uppercase;
  }
}

.dash-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--field-border-default);
  border-radius: 6px;
  font-size: 13px;
  background: var(--field-bg-default);
  color: var(--field-text-default);
  outline: none;

  &::placeholder { color: var(--field-text-placeholder); }
  &:focus { border-color: var(--field-border-focus); }
}

.filter-select {
  padding: 8px 28px 8px 12px;
  border: 1px solid var(--field-border-default);
  border-radius: 6px;
  font-size: 13px;
  background: var(--field-bg-default);
  color: var(--field-text-default);
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236B7280' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;

  &:focus { border-color: var(--field-border-focus); }
}

.venue-table-wrap {
  background: var(--bg-surface);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.table-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(93vh - 320px);
  min-height: 200px;
}

.venue-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;

  thead tr { border-bottom: 1px solid var(--table-border); }
  th {
    padding: 12px 14px;
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--table-text-header);
    background: var(--table-header-bg);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
  }
  tbody tr {
    border-bottom: 1px solid var(--table-border);
    transition: background 0.15s;
    &:last-child { border-bottom: none; }
    &:hover { background: var(--bg-hover); }
  }

  td {
    padding: 11px 14px;
    vertical-align: middle;
    color: var(--table-text-body);
  }
}

.td-code {
  font-size: 12px;
  font-family: 'Courier New', monospace;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.td-name {
  font-weight: 600;
  color: var(--text-primary);
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.td-subtype {
  font-size: 12px;
  color: var(--text-tertiary);
}

.td-location { color: var(--text-secondary); font-size: 12px; }

.td-capacity {
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  &.type-training   { background: var(--category-bg-alpha);  color: var(--category-text-alpha);  }
  &.type-conference { background: var(--category-bg-gamma);  color: var(--category-text-gamma);  }
  &.type-shopfloor  { background: var(--category-bg-delta);  color: var(--category-text-delta);  }
  &.type-dojo       { background: var(--status-error-bg);    color: var(--status-error-text);    }
  &.type-virtual    { background: var(--category-bg-beta);   color: var(--category-text-beta);   }
  &.type-external   { background: var(--bg-muted);           color: var(--text-secondary);       }
}

.td-facilities {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 220px;
}

.facility-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px 2px 5px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;

  &.fac-projector  { background: var(--category-bg-beta);   color: var(--category-text-beta);   }
  &.fac-whiteboard { background: var(--status-error-bg);    color: var(--status-error-text);    }
  &.fac-ac         { background: var(--category-bg-alpha);  color: var(--category-text-alpha);  }
  &.fac-pantry     { background: var(--category-bg-gamma);  color: var(--category-text-gamma);  }
  &.fac-screen     { background: var(--category-bg-beta);   color: var(--category-text-beta);   }
  &.fac-recording  { background: var(--category-bg-gamma);  color: var(--category-text-gamma);  }
}

.fac-icon {
  font-size: 11px;
  line-height: 1;
}

.no-facility { color: var(--text-disabled); }

.td-link {
  font-size: 11px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.virtual-link {
  color: var(--text-link);
  text-decoration: none;

  &:hover { text-decoration: underline; }
}

.status-badge {
  font-size: 12px;
  font-weight: 600;

  &.status-active   { color: var(--status-success-text); }
  &.status-inactive { color: var(--state-disabled-text); }
}

.td-actions {
  white-space: nowrap;
  display: flex;
  gap: 6px;
}

.btn-edit,
.btn-delete {
  background: none;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  padding: 5px 8px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: background 0.15s;
}

.btn-edit {
  color: var(--action-primary-default);
  border-color: var(--action-primary-disabled);

  &:hover { background: var(--bg-selected); border-color: var(--action-primary-default); }
}

.btn-delete {
  color: var(--status-error-text);
  border-color: var(--status-error-border);

  &:hover { background: var(--status-error-bg); border-color: var(--status-error-text); }
}

.empty-state {
  text-align: center;
  padding: 40px 0;
  color: var(--text-disabled);
  font-size: 14px;
}

.table-footer {
  padding: 10px 16px;
  font-size: 12px;
  color: var(--text-tertiary);
  border-top: 1px solid var(--table-border);
}

// ── Modal ──────────────────────────────────────────────
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 60px;
  left: 0; top: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
}
.modal-content-wrapper {
  display: flex;
  justify-content: center;
}
.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 0;
  border: 1px solid #888;
  width: 800px;
  min-height: 320px;
  border-radius: 8px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  box-sizing: border-box;
}
.titlecontainer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 21px;
  margin-bottom: 0;
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fefefe;
  border-bottom: 1px solid #e5e5e5;
}
.buttfilter { font-weight: 700; font-size: 18px; margin: 0; color: #333333; }
.icons { display: flex; gap: 24px; align-items: center; }
.action { display: flex; gap: 16px; align-items: center; }
.save {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 40px; border-radius: 8px; background: #1EAE8A; cursor: pointer; transition: all 0.3s ease;
  mat-icon { color: #fff; font-size: 20px; width: 22px; height: 22px; }
  &:hover { background: #189b7a; transform: translateY(-1px); box-shadow: 0 4px 8px rgba(30,174,138,0.3); }
}
.delete {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 40px; border-radius: 8px; border: 1px solid #E63946; background: transparent; cursor: pointer; transition: all 0.3s ease;
  mat-icon { color: #E63946; font-size: 20px; width: 20px; height: 20px; }
  &:hover { background: rgba(230,57,70,0.1); transform: translateY(-1px); }
}
.add {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 40px; border-radius: 8px; border: 1px solid #818181; background: transparent; cursor: pointer; transition: all 0.3s ease;
  mat-icon { color: #818181; font-size: 20px; width: 20px; height: 20px; }
  &:hover { background: rgba(129,129,129,0.1); border-color: #666; transform: translateY(-1px); }
}
.closeicon {
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.3s ease;
  mat-icon { width: 27px; height: 27px; font-size: 27px; color: #666666; }
  &:hover { transform: scale(1.1); mat-icon { color: #333333; } }
}
.modal-form { width: 100%; display: flex; flex-direction: column; gap: 20px; padding: 16px 21px 21px; }

.section-header {
  border-left: 3px solid var(--action-primary-default);
  padding: 6px 10px;
  margin: 12px 0 8px;
  border-bottom: 1px solid var(--border-default);

  span {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--text-tertiary);
    text-transform: uppercase;
  }
}

.checkbox-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 0;

  gb-checkbox {
    min-height: 40px;
    overflow: visible;
    white-space: normal;
  }
}

[dir="rtl"] {
  .dash-header { flex-direction: row-reverse; }
  .section-header { border-left: none; border-right: 3px solid var(--action-primary-default); }
}
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content-wrapper {
  display: flex;
  justify-content: center;
  margin-top: -40px;
}

.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 0;
  border: 1px solid #888;
  width: 800px;
  min-height: 420px;
  border-radius: 8px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  box-sizing: border-box;
}

// ── Modal Title Bar ───────────────────────────────────
.titlecontainer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 21px;
  margin-bottom: 0;
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fefefe;
  border-bottom: 1px solid #e5e5e5;
}

// ── Contact LOV overlay ──────────────────────────────────
.FormModal {
  position: fixed;
  z-index: 9999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
}

.FormModal_contentLovType {
  justify-content: center;
  background-color: var(--mat-sys-background);
  margin: auto;
  padding: 10px;
  border: 1px solid #888;
  width: 1200px;
  height: 500px;
  border-radius: 10px;
  overflow: auto;
}

// The Contact lightbox above is a custom fixed-position overlay (z-index 9999),
// but the picklist's own results dialog is a MatDialog rendered inside Angular
// CDK's global overlay container (default z-index 1000) — so it renders behind
// the Contact lightbox unless raised above it. Same fix as attendancecalendar.component.scss.
::ng-deep .cdk-overlay-container {
  z-index: 100000 !important;
}

::ng-deep .cdk-overlay-pane {
  z-index: 100001 !important;
}

::ng-deep .mat-mdc-dialog-container {
  z-index: 100002 !important;
}

.NewFormcloseicon {
  float: right;
  cursor: pointer;
  position: relative;
  top: -5px;
}

.buttfilter {
  font-family: var(--app-font-family);
  font-weight: 700;
  font-style: normal;
  font-size: 18px;
  line-height: 150%;
  margin: 0;
  color: #333333;
}

.icons {
  display: flex;
  gap: 24px;
  align-items: center;
}

.action {
  display: flex;
  gap: 16px;
  align-items: center;
}

// ── Modal Action Buttons ──────────────────────────────
.save {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 40px;
  border-radius: 8px;
  background: #1EAE8A;
  cursor: pointer;
  transition: all 0.3s ease;

  mat-icon {
    color: #ffffff;
    font-size: 20px;
    width: 22px;
    height: 22px;
  }

  &:hover {
    background: #189b7a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 174, 138, 0.3);
  }

  &:active { transform: translateY(0); }
}

.delete {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #E63946;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;

  mat-icon {
    color: #E63946;
    font-size: 20px;
    width: 20px;
    height: 20px;
  }

  &:hover {
    background: rgba(230, 57, 70, 0.1);
    transform: translateY(-1px);
  }

  &:active { transform: translateY(0); }
}

.add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #818181;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;

  mat-icon {
    color: #818181;
    font-size: 20px;
    width: 20px;
    height: 20px;
  }

  &:hover {
    background: rgba(129, 129, 129, 0.1);
    border-color: #666666;
    transform: translateY(-1px);
  }

  &:active { transform: translateY(0); }
}

.closeicon {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease;

  mat-icon {
    width: 27px;
    height: 27px;
    font-size: 27px;
    color: #666666;
  }

  &:hover {
    transform: scale(1.1);

    mat-icon { color: #333333; }
  }
}

.container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-left: 30px;
}
.container > div { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.container .adjacentField { width: 100%; margin-right: 0; display: block; }