body {
      font-family: Arial, sans-serif;
      margin: 0;
      background: #f4f4f4;
    }

    #login-screen {
      max-width: 360px;
      margin: 120px auto;
      background: #fff;
      padding: 30px;
      border-radius: 8px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }

    #login-screen h1 {
      margin-top: 0;
      font-size: 20px;
      text-align: center;
    }

    #login-screen input {
      width: 100%;
      padding: 8px;
      margin-bottom: 12px;
      box-sizing: border-box;
      font-size: 14px;
    }

    #login-screen button {
      width: 100%;
      padding: 10px;
      background: #2c7a3f;
      color: #fff;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
    }

    #login-error {
      color: #c0392b;
      font-size: 13px;
      margin-bottom: 10px;
      min-height: 16px;
    }

    #app-screen {
      display: none;
      height: 100vh;
      box-sizing: border-box;
      padding: 12px;
    }

    #app-header {
      margin-bottom: 10px;
      border: 1px solid #c8d3dc;
      border-radius: 6px;
      overflow: hidden;
      background: #fff;
    }

    #app-topbar {
      min-height: 40px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0 12px;
      box-sizing: border-box;
    }

    #app-header h1 {
      font-size: 18px;
      margin: 0;
    }

    #logout-btn {
      padding: 6px 14px;
      cursor: pointer;
    }

    #main-nav {
      display: flex;
      align-items: stretch;
      min-height: 37px;
      background: #2b5c83;
      overflow-x: auto;
    }

    .main-nav-btn {
      border: 0;
      border-right: 1px solid rgba(255,255,255,0.22);
      background: transparent;
      color: #fff;
      padding: 9px 16px;
      cursor: pointer;
      font-size: 13px;
      white-space: nowrap;
    }

    .main-nav-btn:hover {
      background: rgba(255,255,255,0.16);
    }

    .main-nav-btn.active {
      background: #2c7a3f;
      font-weight: bold;
    }

    #app-content {
      height: calc(100vh - 122px);
      display: grid;
      grid-template-rows: minmax(220px, 1fr) minmax(260px, 1fr);
      gap: 12px;
    }

    #module-placeholder {
      display: none;
      height: calc(100vh - 122px);
      box-sizing: border-box;
      background: #fff;
      border: 1px solid #d7d7d7;
      border-radius: 6px;
      padding: 28px;
    }

    #module-placeholder h2 {
      margin: 0 0 10px 0;
      font-size: 20px;
    }

    #module-placeholder p {
      margin: 0;
      color: #666;
      font-size: 14px;
    }

    #obiski-table-panel,
    #obisk-detail-panel {
      min-height: 0;
      background: #fff;
      border: 1px solid #d7d7d7;
      border-radius: 6px;
      overflow: hidden;
    }

    #obiski-table {
      height: 100%;
    }

    .tabulator-row {
      cursor: pointer;
    }

    #obisk-detail-panel {
      padding: 16px;
      box-sizing: border-box;
      overflow-y: auto;
    }

    #obisk-detail-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 20px;
      padding-bottom: 10px;
      margin-bottom: 12px;
      border-bottom: 1px solid #ddd;
    }

    #obisk-detail-title {
      margin: 0;
      font-size: 18px;
    }

    #obisk-detail-hint {
      color: #777;
      font-size: 13px;
    }

    #obisk-detail-main {
      display: grid;
      grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
      gap: 18px;
    }

    .obisk-detail-field {
      margin-bottom: 7px;
      font-size: 14px;
    }

    .obisk-detail-field b {
      display: inline-block;
      width: 115px;
    }

    .obisk-detail-section {
      margin-bottom: 16px;
    }

    .obisk-detail-section h3 {
      font-size: 14px;
      border-bottom: 1px solid #ddd;
      padding-bottom: 5px;
      margin: 0 0 8px 0;
    }

    #obisk-detail-opis {
      white-space: pre-wrap;
      font-size: 14px;
      min-height: 24px;
    }

    #obisk-slike-list {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    #obisk-slike-list img {
      width: 110px;
      height: 110px;
      object-fit: cover;
      border-radius: 4px;
      border: 1px solid #ddd;
      cursor: pointer;
    }

    #obisk-material-list table {
      width: 100%;
      font-size: 13px;
      border-collapse: collapse;
    }

    #obisk-material-list th,
    #obisk-material-list td {
      text-align: left;
      padding: 4px 6px;
      border-bottom: 1px solid #eee;
    }

    .obisk-detail-empty {
      color: #888;
      font-size: 13px;
    }



    #plan-route-btn {
      padding: 7px 12px;
      border: none;
      border-radius: 4px;
      background: #2c7a3f;
      color: #fff;
      cursor: pointer;
      font-size: 14px;
    }

    #plan-route-btn:disabled {
      opacity: 0.55;
      cursor: not-allowed;
    }

    #route-modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.5);
      z-index: 2000;
    }

    #route-modal {
      width: min(1200px, calc(100vw - 32px));
      height: min(820px, calc(100vh - 32px));
      margin: 16px auto;
      box-sizing: border-box;
      padding: 16px;
      background: #fff;
      border-radius: 8px;
      display: grid;
      grid-template-rows: auto auto 1fr auto;
      gap: 10px;
    }

    #route-modal h2 {
      margin: 0;
      font-size: 18px;
    }

    #route-modal-close {
      float: right;
      border: none;
      background: none;
      cursor: pointer;
      font-size: 22px;
    }

    #route-toolbar {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }

    #route-toolbar button,
    #route-modal-actions button {
      padding: 8px 12px;
      cursor: pointer;
    }

    #route-mode-start.active,
    #route-mode-end.active {
      background: #2c7a3f;
      color: #fff;
    }

    #route-place-search {
      width: min(360px, 100%);
      box-sizing: border-box;
      padding: 8px 10px;
      border: 1px solid #aaa;
      border-radius: 4px;
      font-size: 14px;
    }

    #route-map {
      min-height: 350px;
      width: 100%;
      border: 1px solid #d7d7d7;
      border-radius: 5px;
    }

    /* Google Places predlogi morajo biti nad modalnim oknom. */
    .pac-container {
      z-index: 3001 !important;
    }

    #route-status {
      min-height: 18px;
      font-size: 13px;
      color: #333;
    }

    #route-summary {
      margin-left: auto;
      font-size: 14px;
      font-weight: bold;
    }

    #route-modal-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
    }



    #obisk-detail-main {
      display: block;
    }

    #obisk-basic-fields {
      display: grid;
      grid-template-columns: repeat(3, minmax(220px, 1fr));
      gap: 0 18px;
      margin-bottom: 12px;
    }

    .obisk-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
      border-bottom: 1px solid #d7d7d7;
      margin-bottom: 12px;
    }

    .obisk-tab-btn {
      border: 1px solid transparent;
      border-bottom: 0;
      border-radius: 5px 5px 0 0;
      background: #eeeeee;
      padding: 8px 13px;
      cursor: pointer;
      font-size: 13px;
    }

    .obisk-tab-btn.active {
      background: #2c7a3f;
      color: #fff;
    }

    .obisk-tab-panel {
      display: none;
      min-height: 120px;
    }

    .obisk-tab-panel.active {
      display: block;
    }

    .obisk-list-item {
      border: 1px solid #e1e1e1;
      border-radius: 5px;
      padding: 10px;
      margin-bottom: 8px;
      background: #fafafa;
      font-size: 13px;
    }

    .obisk-list-item-title {
      font-weight: bold;
      margin-bottom: 5px;
    }

    .obisk-list-item-meta {
      color: #555;
      margin-bottom: 8px;
    }

    .obisk-list-item button {
      margin-right: 6px;
      padding: 5px 9px;
      cursor: pointer;
    }

    @media (max-width: 800px) {
      #route-modal {
        width: calc(100vw - 16px);
        height: calc(100vh - 16px);
        margin: 8px auto;
      }

      #route-summary {
        width: 100%;
        margin-left: 0;
      }
    }



    #obisk-detail-main {
      display: block;
    }

    #obisk-basic-fields {
      display: grid;
      grid-template-columns: repeat(3, minmax(220px, 1fr));
      gap: 0 18px;
      margin-bottom: 12px;
    }

    .obisk-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
      border-bottom: 1px solid #d7d7d7;
      margin-bottom: 12px;
    }

    .obisk-tab-btn {
      border: 1px solid transparent;
      border-bottom: 0;
      border-radius: 5px 5px 0 0;
      background: #eeeeee;
      padding: 8px 13px;
      cursor: pointer;
      font-size: 13px;
    }

    .obisk-tab-btn.active {
      background: #2c7a3f;
      color: #fff;
    }

    .obisk-tab-panel {
      display: none;
      min-height: 120px;
    }

    .obisk-tab-panel.active {
      display: block;
    }

    .obisk-list-item {
      border: 1px solid #e1e1e1;
      border-radius: 5px;
      padding: 10px;
      margin-bottom: 8px;
      background: #fafafa;
      font-size: 13px;
    }

    .obisk-list-item-title {
      font-weight: bold;
      margin-bottom: 5px;
    }

    .obisk-list-item-meta {
      color: #555;
      margin-bottom: 8px;
    }

    .obisk-list-item button {
      margin-right: 6px;
      padding: 5px 9px;
      cursor: pointer;
    }

    @media (max-width: 800px) {
      #app-content {
        grid-template-rows: minmax(220px, 1fr) minmax(330px, 1fr);
      }

      #obisk-basic-fields {
        grid-template-columns: 1fr;
      }
    }
  
/* Večtočkovni načrtovalnik poti */
    #plan-route-btn {
      padding: 7px 12px;
      border: none;
      border-radius: 4px;
      background: #2c7a3f;
      color: #fff;
      cursor: pointer;
      font-size: 14px;
    }

    #plan-route-btn:disabled { opacity: 0.55; cursor: not-allowed; }

    #route-modal-overlay {
      display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000;
    }

    #route-modal {
      width: min(1320px, calc(100vw - 32px)); height: min(860px, calc(100vh - 32px));
      margin: 16px auto; box-sizing: border-box; padding: 16px; background: #fff;
      border-radius: 8px; display: grid; grid-template-rows: auto 1fr auto; gap: 10px;
    }

    #route-modal h2 { margin: 0; font-size: 18px; }
    #route-modal-close { float: right; border: none; background: none; cursor: pointer; font-size: 22px; }
    #route-modal-body { min-height: 0; display: grid; grid-template-columns: minmax(330px, 420px) 1fr; gap: 12px; }
    #route-stops-panel { min-height: 0; overflow-y: auto; border: 1px solid #d7d7d7; border-radius: 5px; padding: 12px; box-sizing: border-box; }
    .route-field-label { display: block; margin: 0 0 4px 0; font-weight: bold; font-size: 13px; }
    .route-input { width: 100%; padding: 8px 10px; box-sizing: border-box; border: 1px solid #aaa; border-radius: 4px; font-size: 14px; }
    .route-input.active { outline: 2px solid #2c7a3f; border-color: #2c7a3f; }
    .route-stop-block { margin-bottom: 12px; }
    #route-intermediate-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
    .route-intermediate-row { display: grid; grid-template-columns: 26px 1fr auto; gap: 6px; align-items: center; padding: 6px; border: 1px solid #ddd; border-radius: 4px; background: #fafafa; }
    .route-intermediate-row.drag-over { border-color: #2c7a3f; background: #eef8f0; }
    .route-drag-handle { cursor: grab; color: #666; text-align: center; user-select: none; }
    .route-stop-actions { display: flex; gap: 3px; }
    .route-stop-actions button, #route-tools button, #route-modal-actions button { padding: 7px 10px; cursor: pointer; }
    #route-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
    #route-map { min-height: 350px; width: 100%; border: 1px solid #d7d7d7; border-radius: 5px; }
    .pac-container { z-index: 3001 !important; }
    #route-status { min-height: 18px; font-size: 13px; color: #333; }
    #route-summary { font-size: 14px; font-weight: bold; }
    #route-modal-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

    @media (max-width: 900px) { #route-modal { width: calc(100vw - 16px); height: calc(100vh - 16px); margin: 8px auto; } #route-modal-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(320px,1fr); } }
    /* Modul Poslovalnice */
    .poslovalnice-module {
      height: 100%;
      display: flex;
      flex-direction: column;
      min-height: 0;
    }

    .poslovalnice-toolbar {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      align-items: center;
      margin-bottom: 16px;
    }

    .poslovalnice-toolbar h2 {
      margin: 0 0 4px 0;
      font-size: 20px;
    }

    .poslovalnice-toolbar p {
      margin: 0;
      color: #666;
      font-size: 13px;
    }

    .poslovalnice-toolbar-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
      margin-bottom: 8px;
    }

    #stranke-search-input,
    #objekti-search-input,
    #projekti-search-input {
      flex: 1 1 110px;
      min-width: 0;
      box-sizing: border-box;
      padding: 6px 8px;
      border: 1px solid #aaa;
      border-radius: 4px;
      font-size: 12px;
    }

    #poslovalnice-new-stranka-btn,
    #poslovalnice-clear-filters-btn,
    #poslovalnice-refresh-btn {
      flex: 0 0 auto;
      padding: 6px 9px;
      cursor: pointer;
    }

    #poslovalnice-new-stranka-btn {
      border: 1px solid #2c7a3f;
      border-radius: 4px;
      background: #2c7a3f;
      color: #fff;
      font-weight: 600;
    }

    #poslovalnice-new-stranka-btn:hover {
      background: #236532;
      border-color: #236532;
    }

    .poslovalnice-layout {
      --stranke-panel-width: 28%;
      flex: 1;
      min-height: 0;
      display: grid;
      grid-template-columns:
        minmax(260px, var(--stranke-panel-width))
        8px
        minmax(0, 1fr);
      gap: 0;
    }

    .stranke-left-column {
      min-height: 0;
      display: flex;
      flex-direction: column;
      margin-right: 6px;
    }

    .poslovalnice-layout-resizer {
      position: relative;
      cursor: col-resize;
      user-select: none;
      touch-action: none;
    }

    .poslovalnice-layout-resizer::before {
      content: "";
      position: absolute;
      top: 0;
      bottom: 0;
      left: 3px;
      width: 2px;
      border-radius: 2px;
      background: #d0d0d0;
    }

    .poslovalnice-layout-resizer:hover::before {
      background: #2c7a3f;
    }

    .poslovalnice-obisk-detail-panel {
      margin-left: 6px;
    }

    .stranke-list-panel {
      flex: 1;
      min-height: 0;
    }

    .stranke-detail-panel,
    .poslovalnice-left-column,
    .poslovalnice-obiski-list-panel {
      display: none;
    }

    .poslovalnice-obiski-list-panel {
      min-height: 0;
      border: 1px solid #d7d7d7;
      border-radius: 6px;
      background: #fff;
      box-sizing: border-box;
      padding: 16px;
      overflow-y: auto;
    }

    .poslovalnice-obisk-detail-panel {
      min-height: 0;
      border: 1px solid #d7d7d7;
      border-radius: 6px;
      background: #fff;
      box-sizing: border-box;
      padding: 16px;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .poslovalnice-obisk-tab-panel.active {
      flex: 1;
      min-height: 0;
      overflow: auto;
    }

    .poslovalnice-obiski-list-panel h3,
    .poslovalnice-obisk-detail-panel h3 {
      margin: 0 0 14px 0;
      padding-bottom: 10px;
      border-bottom: 1px solid #ddd;
      font-size: 18px;
    }

    .poslovalnice-obisk-detail-header {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: center;
    }

    #poslovalnice-obisk-detail-title {
      margin: 0;
      padding-bottom: 0;
      border-bottom: 0;
    }

    #poslovalnice-obisk-detail-hint {
      color: #777;
      font-size: 13px;
    }
    #poslovalnice-obisk-basic-fields {
      display: grid;
      grid-template-columns: repeat(3, minmax(150px, 1fr));
      gap: 0 14px;
      margin-top: 6px;
      margin-bottom: 12px;
    }

    .poslovalnice-obisk-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
      border-bottom: 1px solid #d7d7d7;
      margin-bottom: 2px;
    }

    .poslovalnice-obisk-tab-btn {
      border: 1px solid transparent;
      border-bottom: 0;
      border-radius: 5px 5px 0 0;
      background: #eeeeee;
      padding: 8px 13px;
      cursor: pointer;
      font-size: 13px;
    }

    .poslovalnice-obisk-tab-btn.active {
      background: #2c7a3f;
      color: #fff;
    }

    .poslovalnice-obisk-tab-panel {
      display: none;
      min-height: 120px;
    }

    .poslovalnice-obisk-tab-panel.active {
      display: block;
    }

    #poslovalnice-obisk-tab-poti.active {
      overflow: hidden;
    }

    .poslovalnice-poti-layout {
      height: calc(100vh - 360px);
      min-height: 420px;
      display: grid;
      grid-template-columns: minmax(280px, 32%) minmax(420px, 1fr);
      gap: 8px;
      overflow: hidden;
    }

    .poslovalnice-poti-left {
      min-width: 0;
      min-height: 0;
      display: flex;
      flex-direction: column;
      border: 1px solid #d7d7d7;
      background: #fff;
      overflow: hidden;
    }

    .poslovalnice-poti-toolbar {
      flex: 0 0 auto;
      padding: 8px;
      border-bottom: 1px solid #d7d7d7;
      background: #f7f7f7;
    }

    #poslovalnice-obisk-poti-list {
      flex: 1;
      min-height: 0;
      overflow: auto;
      padding: 8px;
      box-sizing: border-box;
    }

    .poslovalnice-poti-map-panel {
      min-width: 0;
      min-height: 0;
      border: 1px solid #d7d7d7;
      background: #f7f7f7;
      overflow: hidden;
    }

    #poslovalnice-poti-map {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      box-sizing: border-box;
    }

    @media (max-width: 1100px) {
      #poslovalnice-obisk-basic-fields {
        grid-template-columns: 1fr;
      }
    }
    .material-table-wrap {
      width: 100%;
      border: 1px solid #d7d7d7;
      border-radius: 5px;
      background: #fff;
    }

    .material-table {
      width: 100%;
      min-width: 760px;
      border-collapse: collapse;
      font-size: 13px;
    }

    .material-table th {
      position: sticky;
      top: 47px;
      z-index: 5;
      background: #eeeeee;
      color: #222;
      text-align: left;
      white-space: nowrap;
      padding: 8px 9px;
      border-bottom: 1px solid #cfcfcf;
    }

    .material-table td {
      padding: 8px 9px;
      border-right: 1px solid #e6e6e6;
      border-bottom: 1px solid #e6e6e6;
      vertical-align: top;
    }

    .material-table td:last-child {
      border-right: 0;
    }

    .material-group-item > td {
      padding-top: 4px;
      padding-bottom: 4px;
      vertical-align: middle;
    }

    .material-table tbody tr:nth-child(even) {
      background: #fafafa;
    }

    .material-table tbody tr:hover {
      background: #eef6ff;
    }

    .material-grid-cell {
      cursor: cell;
    }

    .material-group-item.material-grid-row-active > td {
      background: #f4f8fb;
    }

    .material-grid-cell.material-grid-cell-selected {
      background: #eaf3f8 !important;
      box-shadow: inset 0 0 0 1px #8eb6cf;
    }

    .material-grid-cell.material-grid-cell-active {
      position: relative;
      z-index: 2;
      background: #ffffff !important;
      box-shadow: inset 0 0 0 2px #2f6f95;
      outline: none;
    }

    .material-table th:first-child,
    .material-table td:first-child {
      width: 52px;
      min-width: 52px;
      text-align: center;
      white-space: nowrap;
    }

    .material-table th:nth-child(2),
    .material-table td:nth-child(2) {
      min-width: 260px;
    }

    .material-table th:nth-child(3),
    .material-table td:nth-child(3) {
      width: 75px;
      min-width: 75px;
      text-align: right;
      white-space: nowrap;
    }

    .material-table th:nth-child(4),
    .material-table td:nth-child(4) {
      width: 65px;
      min-width: 65px;
      white-space: nowrap;
    }

    .material-table th:nth-child(5),
    .material-table td:nth-child(5) {
      width: 90px;
      min-width: 90px;
      text-align: right;
      white-space: nowrap;
    }

    .material-table th:nth-child(6),
    .material-table td:nth-child(6) {
      width: 90px;
      min-width: 90px;
      text-align: right;
      white-space: nowrap;
    }

    .material-table th:nth-child(7),
    .material-table td:nth-child(7) {
      text-align: center;
      white-space: nowrap;
    }
    .material-toolbar {
      position: sticky;
      top: 0;
      z-index: 6;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      margin-bottom: 8px;
      padding: 6px 0 8px;
      background: #fff;
      clear: none;
    }

    .material-toolbar > button {
      height: 28px;
      box-sizing: border-box;
      font-family: inherit;
      font-size: 12px;
      font-weight: 400;
      line-height: normal;
    }

    .material-history-icon-btn {
      flex: 0 0 auto;
      width: 34px;
      height: 28px;
      padding: 0;
      border: 1px solid #767676;
      border-radius: 2px;
      background: #f5f5f5;
      color: #111;
      font-family: Arial, sans-serif;
      font-size: 21px;
      font-weight: 700;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }

    .material-history-icon-btn:hover:not(:disabled) {
      background: #e9e9e9;
      border-color: #555;
      color: #111;
    }

    .material-history-icon-btn:disabled {
      background: #f5f5f5;
      border-color: #b8b8b8;
      color: #999;
      opacity: 1;
      cursor: default;
    }

    .material-add-btn,
    .material-edit-btn,
    .material-delete-btn {
      border: 1px solid #b9b9b9;
      border-radius: 4px;
      padding: 5px 8px;
      background: #fff;
      cursor: pointer;
      font-size: 12px;
    }

    .material-add-btn {
      border-color: #2c7a3f;
      background: #2c7a3f;
      color: #fff;
      font-size: 13px;
    }
    .material-expand-all-btn {
      margin-right: 8px;
      border-color: #1d5f9c;
      background: #fff;
      color: #1d5f9c;
      font-size: 13px;
    }

    .material-expand-all-btn:hover {
      background: #eef5fb;
    }

    .material-edit-btn:hover {
      border-color: #1d5f9c;
      color: #1d5f9c;
    }

    .material-delete-btn {
      margin-left: 5px;
    }

    .material-delete-btn:hover {
      border-color: #b42318;
      color: #b42318;
    }

    .material-actions {
      white-space: nowrap;
      text-align: center;
    }

    .material-modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 5000;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 16px;
      background: rgba(0, 0, 0, 0.45);
      box-sizing: border-box;
    }

    .material-modal {
      width: min(560px, 100%);
      max-height: calc(100vh - 32px);
      overflow-y: auto;
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    }

    .material-modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 16px;
      border-bottom: 1px solid #d7d7d7;
    }

    .material-modal-header h3 {
      margin: 0;
    }

    .material-modal-close-btn {
      border: 0;
      background: transparent;
      font-size: 26px;
      line-height: 1;
      cursor: pointer;
    }

    .material-form {
      display: flex;
      flex-direction: column;
      gap: 12px;
      padding: 16px;
    }

    .material-form label {
      display: flex;
      flex-direction: column;
      gap: 5px;
      font-size: 13px;
      font-weight: bold;
    }

    .material-form input,
    .material-form textarea {
      width: 100%;
      box-sizing: border-box;
      border: 1px solid #b9b9b9;
      border-radius: 4px;
      padding: 8px;
      font: inherit;
      font-weight: normal;
    }

    .material-form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .material-modal-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      margin-top: 4px;
    }

    .material-modal-actions button {
      border: 1px solid #b9b9b9;
      border-radius: 4px;
      padding: 8px 12px;
      cursor: pointer;
    }

    .material-modal-save-btn {
      border-color: #2c7a3f !important;
      background: #2c7a3f;
      color: #fff;
    }
    #poslovalnice-obisk-slike-list {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      align-content: flex-start;
    }

    .poslovalnice-obisk-slika {
      width: 150px;
      height: 150px;
      object-fit: cover;
      border: 1px solid #d7d7d7;
      border-radius: 5px;
      cursor: pointer;
      background: #f5f5f5;
    }

    .poslovalnice-obisk-slika:hover {
      border-color: #2c7a3f;
    }
    #poslovalnice-obisk-poti-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .poslovalnice-pot-item {
      border: 1px solid #d7d7d7;
      border-radius: 5px;
      background: #fff;
      padding: 12px;
    }

    .poslovalnice-pot-editor {
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .poslovalnice-pot-editor-header {
      font-size: 15px;
      padding-bottom: 8px;
      border-bottom: 1px solid #d7d7d7;
    }

    .poslovalnice-pot-editor-field {
      display: flex;
      flex-direction: column;
      gap: 5px;
      font-size: 13px;
      font-weight: 600;
    }

    .poslovalnice-pot-editor-field input {
      width: 100%;
      height: 32px;
      padding: 5px 8px;
      box-sizing: border-box;
      border: 1px solid #b8b8b8;
      border-radius: 4px;
      font: inherit;
      font-weight: 400;
    }

    .poslovalnice-pot-editor-section-title {
      font-size: 13px;
      font-weight: 600;
      margin-bottom: 6px;
    }

    .poslovalnice-pot-editor-vmesne {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    #poslovalnice-pot-vmesne-list {
      width: 100%;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .poslovalnice-pot-vmesna-row {
      width: 100%;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 28px;
      gap: 6px;
      align-items: center;
    }

    .poslovalnice-pot-vmesna-input {
      width: 100%;
      height: 32px;
      padding: 5px 8px;
      box-sizing: border-box;
      border: 1px solid #b8b8b8;
      border-radius: 4px;
      font: inherit;
    }

    .poslovalnice-pot-vmesna-remove {
      width: 28px;
      height: 32px;
      padding: 0;
      box-sizing: border-box;
    }

    #poslovalnice-pot-dodaj-vmesno-btn {
      align-self: flex-start;
    }

    .poslovalnice-pot-editor-actions {
      display: flex;
      gap: 8px;
      padding-top: 4px;
    }

    .poslovalnice-pot-title {
      font-size: 14px;
      font-weight: bold;
      color: #222;
      margin-bottom: 5px;
    }

    .poslovalnice-pot-meta {
      font-size: 13px;
      color: #666;
      margin-bottom: 4px;
      overflow-wrap: anywhere;
    }

    .poslovalnice-pot-open-btn {
      margin-top: 7px;
      padding: 7px 10px;
      border: 1px solid #2c7a3f;
      border-radius: 4px;
      background: #fff;
      color: #2c7a3f;
      cursor: pointer;
      font-size: 13px;
    }

    .poslovalnice-pot-open-btn:hover {
      background: #eaf5ec;
    }
    #poslovalnice-obisk-dobavnice-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .poslovalnice-obiski-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .poslovalnice-obisk-item {
      border: 1px solid #d7d7d7;
      border-radius: 5px;
      padding: 10px 12px;
      background: #fff;
    }

    .poslovalnice-obisk-title {
      font-size: 14px;
      font-weight: bold;
      color: #222;
      margin-bottom: 4px;
    }

    .poslovalnice-obisk-meta {
      font-size: 13px;
      color: #666;
    }

    .stranke-list-panel,
    .stranke-detail-panel,
    .poslovalnice-list-panel,
    .poslovalnice-detail-panel {
      min-height: 0;
      border: 1px solid #d7d7d7;
      border-radius: 6px;
      background: #fff;
      box-sizing: border-box;
    }

    .stranke-list-panel,
    .poslovalnice-list-panel {
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    #stranke-list-status,
    #poslovalnice-list-status {
      padding: 9px 12px;
      border-bottom: 1px solid #e1e1e1;
      color: #666;
      font-size: 13px;
    }

    #stranke-list,
    #poslovalnice-list {
      overflow-y: auto;
      padding: 6px;
    }

    .stranke-tree-stranka,
    .stranke-tree-objekt {
      width: 100%;
    }

    .stranke-tree-objekt {
      position: relative;
    }

    .stranke-tree-objekt:not(:last-child)::after {
      content: '';
      position: absolute;
      left: 15px;
      top: 17px;
      bottom: -17px;
      border-left: 1px dotted #8f9ba5;
      pointer-events: none;
      z-index: 1;
    }

    .stranke-tree-row {
      width: 100%;
      min-height: 34px;
      display: flex;
      align-items: center;
      gap: 6px;
      border: 0;
      border-radius: 4px;
      background: transparent;
      padding: 6px 8px;
      text-align: left;
      cursor: pointer;
      box-sizing: border-box;
      color: #222;
    }

    .stranke-tree-row:hover {
      background: #f0f4f8;
    }

    .stranke-tree-row.selected {
      background: #d9edf7;
    }

    .stranke-tree-row.selected:hover {
      background: #d9edf7;
    }

    .stranke-tree-stranka:has(> .stranke-tree-stranka-row.selected) {
      border: 2px solid #ff7a00;
      border-radius: 4px;
      box-sizing: border-box;
    }

    .stranke-tree-stranka:has(> .stranke-tree-stranka-row.selected)
      .stranke-tree-objekt-row:not(.selected),
    .stranke-tree-stranka:has(> .stranke-tree-stranka-row.selected)
      .stranke-tree-projekt:not(.selected) {
      background: #f3f4f5;
    }

    .stranke-tree-stranka-row {
      font-weight: 700;
    }

    .stranke-tree-objekt-row {
      position: relative;
      padding-left: 34px;
      font-weight: 600;
    }

    .stranke-tree-objekt-row::before {
      content: '';
      position: absolute;
      left: 15px;
      top: -17px;
      width: 27px;
      height: 34px;
      border-left: 1px dotted #8f9ba5;
      border-bottom: 1px dotted #8f9ba5;
      box-sizing: border-box;
      pointer-events: none;
      z-index: 0;
    }

    .stranke-tree-projekt {
      position: relative;
      padding-left: 60px;
      font-weight: 400;
    }

    .stranke-tree-projekt.selected {
      color: #C2410C;
      font-weight: 700;
    }

    .stranke-tree-projekt::before {
      content: '';
      position: absolute;
      left: 42px;
      top: -17px;
      width: 40px;
      height: 34px;
      border-left: 1px dotted #8f9ba5;
      border-bottom: 1px dotted #8f9ba5;
      box-sizing: border-box;
      pointer-events: none;
      z-index: 0;
    }

    .stranke-tree-toggle {
      position: relative;
      z-index: 2;
      width: 15px;
      height: 15px;
      flex: 0 0 15px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-sizing: border-box;
      border: 1px solid #8f9ba5;
      border-radius: 2px;
      background: #ffffff;
      color: #333333;
      font-size: 12px;
      font-weight: 700;
      line-height: 1;
      text-align: center;
    }

    .stranke-tree-icon,
    .stranke-tree-label {
      position: relative;
      z-index: 1;
    }

    .stranke-tree-spacer {
      width: 16px;
      flex: 0 0 16px;
    }

    .stranke-tree-label {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .stranke-tree-actions {
      flex: 0 0 auto;
      margin-left: auto;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }

    .stranke-tree-add-btn,
    .stranke-tree-delete-btn {
      width: 23px;
      height: 23px;
      box-sizing: border-box;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 4px;
      background: #ffffff;
      cursor: pointer;
      line-height: 1;
    }

    .stranke-tree-add-btn {
      border: 1px solid #2c7a3f;
      color: #2c7a3f;
      font-size: 17px;
      font-weight: 600;
    }

    .stranke-tree-add-btn:hover {
      background: #eaf5ec;
    }

    .stranke-tree-delete-btn {
      border: 1px solid #c94b4b;
      color: #c94b4b;
    }

    .stranke-tree-delete-btn:hover {
      background: #fdecec;
    }

    .stranke-tree-delete-btn svg {
      display: block;
      pointer-events: none;
    }

    .poslovalnica-list-item {
      width: 100%;
      display: flex;
      flex-direction: column;
      gap: 3px;
      text-align: left;
      border: 1px solid transparent;
      border-radius: 5px;
      background: #fff;
      padding: 10px;
      margin-bottom: 4px;
      cursor: pointer;
    }

    .poslovalnica-list-item:hover {
      background: #f2f7fb;
      border-color: #c8d8e5;
    }

    .poslovalnica-list-item.selected {
      background: #eaf5ec;
      border-color: #2c7a3f;
    }

    .poslovalnica-list-title {
      font-size: 14px;
      font-weight: bold;
      color: #222;
    }
    .poslovalnica-list-title-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .poslovalnica-obiski-badge {
      flex: 0 0 auto;
      padding: 2px 7px;
      border-radius: 10px;
      background: #dceefc;
      color: #245b85;
      font-size: 11px;
      font-weight: bold;
      white-space: nowrap;
    }

    .poslovalnica-list-meta {
      font-size: 13px;
      color: #666;
    }

    .stranke-detail-panel,
    .poslovalnice-detail-panel {
      padding: 16px;
      overflow-y: auto;
    }

    .stranke-detail-panel h3,
    .poslovalnice-detail-panel h3 {
      margin: 0 0 14px 0;
      padding-bottom: 10px;
      border-bottom: 1px solid #ddd;
      font-size: 18px;
    }

    .poslovalnica-detail-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 8px;
    }

    .poslovalnica-detail-row {
      display: grid;
      grid-template-columns: 145px 1fr;
      gap: 10px;
      font-size: 14px;
    }

    .poslovalnice-empty {
      color: #888;
      font-size: 13px;
    }

    @media (max-width: 800px) {
      .poslovalnice-toolbar {
        align-items: stretch;
        flex-direction: column;
      }

      .poslovalnice-toolbar-actions {
        width: 100%;
      }

      #poslovalnice-search-input {
        width: 100%;
        max-width: none;
      }

      .poslovalnice-layout {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(240px, 1fr) minmax(260px, 1fr);
      }
    }
    .poslovalnice-obisk-item.selected {
      border-color: #2c7a3f;
      background: #e8f5ea;
    }
    .material-group-row td {
      padding: 0;
      border-top: 12px solid #fff;
      border-bottom: 1px solid #93b6cd;
      background: #d7e9f7;
    }

    .material-group-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 2px 12px;
      color: #245b85;
    }

    .material-group-title {
      font-weight: bold;
    }

    .material-group-count {
      color: #607386;
      font-size: 12px;
    }

    .material-group-dobavnica-link {
      border: 0;
      padding: 0;
      background: transparent;
      color: #1d5f9c;
      cursor: pointer;
      font: inherit;
      text-decoration: underline;
    }

    .material-group-dobavnica-link:hover {
      color: #2c7a3f;
    }

    .material-group-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 12px;
      flex: 0 0 auto;
    }

    .material-group-delete-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 28px;
      padding: 0;
      border: 0;
      background: transparent;
      color: #444;
      cursor: pointer;
      font-size: 24px;
      font-weight: normal;
      line-height: 1;
    }

    .material-group-delete-btn:hover {
      background: rgba(0, 0, 0, 0.08);
      color: #111;
    }

    .material-group-total {
      flex: 0 0 auto;
      min-width: 80px;
      text-align: right;
      color: #245b85;
      white-space: nowrap;
    }

    .material-total-summary {
      position: sticky;
      bottom: 0;
      z-index: 3;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 16px;
      margin-top: 10px;
      padding: 12px 14px;
      border-top: 2px solid #2c7a3f;
      background: #f4fbf5;
      color: #1d562b;
      font-size: 14px;
      font-weight: bold;
      box-shadow: 0 -5px 12px rgba(0, 0, 0, 0.08);
    }
    .material-group-item.is-collapsed {
      display: none;
    }

    .material-group-toggle {
      cursor: pointer;
      user-select: none;
    }

    .material-group-toggle.selected {
      background: #b9d9ee;
      box-shadow: inset 4px 0 0 #245b85;
    }

    .material-group-toggle.selected .material-group-header {
      color: #17496e;
    }

    .material-group-toggle:focus {
      outline: 2px solid #1d5f9c;
      outline-offset: -2px;
    }

    .material-group-arrow {
      display: inline-block;
      width: 18px;
      margin-right: 4px;
      color: #245b85;
    }
    .obisk-dela-toolbar {
      display: flex;
      justify-content: flex-end;
      margin: 0 0 12px;
    }

    #poslovalnice-obisk-dodaj-delo-btn,
    .obisk-delo-edit-btn {
      border: 1px solid #2c7a3f;
      border-radius: 4px;
      background: #2c7a3f;
      color: #fff;
      cursor: pointer;
      font-size: 12px;
      font-weight: 700;
      line-height: 1;
      padding: 7px 11px;
    }

    #poslovalnice-obisk-dodaj-delo-btn:hover,
    .obisk-delo-edit-btn:hover {
      background: #236532;
      border-color: #236532;
    }

    #poslovalnice-obisk-dodaj-delo-btn:disabled {
      background: #a7b8ad;
      border-color: #a7b8ad;
      cursor: default;
    }

    .material-import-toolbar {
      float: right;
      display: flex;
      justify-content: flex-end;
      margin: 6px 0 8px 8px;
    }

    .material-document-layout {
      --material-panel-width: 65%;
      clear: both;
      height: calc(100vh - 390px);
      min-height: 420px;
      display: grid;
      grid-template-columns:
        minmax(400px, var(--material-panel-width))
        8px
        minmax(320px, 1fr);
      gap: 0;
      overflow: hidden;
    }

    .material-document-material {
      min-width: 0;
      min-height: 0;
      height: 100%;
      overflow: auto;
      padding-right: 6px;
      box-sizing: border-box;
    }

    .material-document-resizer {
      position: relative;
      height: 100%;
      cursor: col-resize;
      user-select: none;
      touch-action: none;
    }

    .material-document-resizer::before {
      content: "";
      position: absolute;
      top: 0;
      bottom: 0;
      left: 3px;
      width: 2px;
      border-radius: 2px;
      background: #d0d0d0;
    }

    .material-document-resizer:hover::before {
      background: #2c7a3f;
    }

    .material-document-preview {
      min-width: 0;
      min-height: 0;
      height: 100%;
      margin-left: 6px;
      border: 1px solid #d7d7d7;
      background: #f7f7f7;
      overflow: hidden;
      box-sizing: border-box;
    }

    #material-document-preview-empty {
      width: 100%;
      height: 100%;
      min-height: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      box-sizing: border-box;
      color: #777;
      text-align: center;
    }

    #material-document-preview-empty[hidden],
    #material-document-viewport[hidden],
    #material-document-preview-image[hidden],
    #material-document-preview-canvas[hidden] {
      display: none;
    }

    #material-document-viewport {
      position: relative;
      width: 100%;
      height: 100%;
      overflow: hidden;
      background: #3a3a3a;
      cursor: grab;
      touch-action: none;
    }

    #material-document-viewport.dragging {
      cursor: grabbing;
    }

    #material-document-stage {
      position: absolute;
      left: 0;
      top: 0;
      transform-origin: 0 0;
      will-change: transform;
    }

    #material-document-preview-image,
    #material-document-preview-canvas {
      display: block;
      max-width: none;
      max-height: none;
      background: #fff;
      user-select: none;
      -webkit-user-select: none;
      -webkit-user-drag: none;
      pointer-events: none;
    }

    #poslovalnice-clear-filters-btn,
    #poslovalnice-collapse-all-btn,
    #poslovalnice-refresh-btn,
    .material-expand-all-btn,
    .material-add-btn,
    #poslovalnice-uvozi-dobavnice-btn {
      flex: 0 0 auto;
      padding: 6px 9px;
      border: 1px solid #767676;
      border-radius: 2px;
      background: #f5f5f5;
      color: #111;
      cursor: pointer;
      font-family: inherit;
      font-size: 12px;
      font-weight: 400;
      line-height: normal;
    }

    #poslovalnice-clear-filters-btn:hover,
    #poslovalnice-collapse-all-btn:hover,
    #poslovalnice-refresh-btn:hover,
    .material-expand-all-btn:hover,
    .material-add-btn:hover,
    #poslovalnice-uvozi-dobavnice-btn:hover {
      background: #e9e9e9;
      border-color: #555;
      color: #111;
    }

    #poslovalnice-uvozi-dobavnice-btn:disabled {
      opacity: 0.5;
      cursor: default;
    }

    #dobavnice-import-overlay[hidden],
    #nova-stranka-overlay[hidden],
    #nov-objekt-overlay[hidden],
    #nov-projekt-overlay[hidden] {
      display: none;
    }

    #dobavnice-import-overlay,
    #nova-stranka-overlay,
    #nov-objekt-overlay,
    #nov-projekt-overlay {
      position: fixed;
      inset: 0;
      z-index: 5000;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      box-sizing: border-box;
      background: rgba(0, 0, 0, 0.35);
    }

    #dobavnice-import-dialog,
    #nova-stranka-dialog,
    #nov-objekt-dialog,
    #nov-projekt-dialog {
      width: min(720px, calc(100vw - 48px));
      max-height: calc(100vh - 48px);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
    }

    #dobavnice-import-dialog h3,
    #nova-stranka-dialog h3,
    #nov-objekt-dialog h3,
    #nov-projekt-dialog h3 {
      margin: 0;
      padding: 16px 18px;
      border-bottom: 1px solid #ddd;
      color: #1f3b2a;
      font-size: 18px;
    }

    #nova-stranka-dialog,
    #nov-objekt-dialog,
    #nov-projekt-dialog {
      width: min(620px, calc(100vw - 48px));
    }

    .nova-stranka-form,
    .nov-objekt-form,
    .nov-projekt-form {
      display: grid;
      grid-template-columns: 140px minmax(0, 1fr);
      gap: 12px 14px;
      align-items: center;
      padding: 20px 22px;
      overflow-y: auto;
    }

    .nova-stranka-form label,
    .nov-objekt-form label,
    .nov-projekt-form label {
      color: #333;
      font-size: 13px;
      font-weight: 600;
    }

    .nova-stranka-form input,
    .nova-stranka-form textarea,
    .nov-objekt-form input,
    .nov-objekt-form textarea,
    .nov-projekt-form input,
    .nov-projekt-form textarea {
      width: 100%;
      box-sizing: border-box;
      padding: 8px 10px;
      border: 1px solid #b9b9b9;
      border-radius: 4px;
      background: #fff;
      color: #222;
      font: inherit;
      font-size: 13px;
    }

    .nova-stranka-form input:focus,
    .nova-stranka-form textarea:focus,
    .nov-objekt-form input:focus,
    .nov-objekt-form textarea:focus,
    .nov-projekt-form input:focus,
    .nov-projekt-form textarea:focus {
      outline: 2px solid rgba(44, 122, 63, 0.18);
      border-color: #2c7a3f;
    }

    .nova-stranka-form textarea,
    .nov-objekt-form textarea,
    .nov-projekt-form textarea {
      min-height: 72px;
      resize: vertical;
    }

    .nova-stranka-actions,
    .nov-objekt-actions,
    .nov-projekt-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      padding: 14px 22px 18px;
      border-top: 1px solid #e1e1e1;
      background: #f7f7f7;
    }

    .nova-stranka-actions button,
    .nov-objekt-actions button,
    .nov-projekt-actions button {
      min-height: 32px;
      padding: 6px 12px;
      border: 1px solid #a9a9a9;
      border-radius: 4px;
      background: #fff;
      color: #222;
      cursor: pointer;
      font: inherit;
      font-size: 13px;
    }

    #nova-stranka-save-btn,
    #nov-objekt-save-btn,
    #nov-projekt-save-btn {
      border-color: #2c7a3f;
      background: #2c7a3f;
      color: #fff;
      font-weight: 600;
    }

    #nova-stranka-save-btn:hover,
    #nov-objekt-save-btn:hover,
    #nov-projekt-save-btn:hover {
      background: #236532;
      border-color: #236532;
    }

    #nova-stranka-save-object-btn,
    #nov-objekt-save-project-btn {
      border-color: #2c7a3f;
      color: #2c7a3f;
      font-weight: 600;
    }

    #nova-stranka-save-object-btn:hover,
    #nov-objekt-save-project-btn:hover {
      background: #eaf5ec;
    }

    #nova-stranka-cancel-btn:hover,
    #nov-objekt-cancel-btn:hover,
    #nov-projekt-cancel-btn:hover {
      background: #ededed;
    }

    .nova-stranka-form label,
    .nov-objekt-form label {
      color: #333;
      font-size: 13px;
      font-weight: 600;
    }

    .nova-stranka-form input,
    .nova-stranka-form textarea,
    .nov-objekt-form input,
    .nov-objekt-form textarea {
      width: 100%;
      box-sizing: border-box;
      padding: 8px 10px;
      border: 1px solid #b9b9b9;
      border-radius: 4px;
      background: #fff;
      color: #222;
      font: inherit;
      font-size: 13px;
    }

    .nova-stranka-form input:focus,
    .nova-stranka-form textarea:focus,
    .nov-objekt-form input:focus,
    .nov-objekt-form textarea:focus {
      outline: 2px solid rgba(44, 122, 63, 0.18);
      border-color: #2c7a3f;
    }

    .nova-stranka-form textarea,
    .nov-objekt-form textarea {
      min-height: 72px;
      resize: vertical;
    }

    .nova-stranka-actions,
    .nov-objekt-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      padding: 14px 22px 18px;
      border-top: 1px solid #e1e1e1;
      background: #f7f7f7;
    }

    .nova-stranka-actions button,
    .nov-objekt-actions button {
      min-height: 32px;
      padding: 6px 12px;
      border: 1px solid #a9a9a9;
      border-radius: 4px;
      background: #fff;
      color: #222;
      cursor: pointer;
      font: inherit;
      font-size: 13px;
    }

    #nova-stranka-save-btn,
    #nov-objekt-save-btn {
      border-color: #2c7a3f;
      background: #2c7a3f;
      color: #fff;
      font-weight: 600;
    }

    #nova-stranka-save-btn:hover,
    #nov-objekt-save-btn:hover {
      background: #236532;
      border-color: #236532;
    }

    #nova-stranka-save-object-btn,
    #nov-objekt-save-project-btn {
      border-color: #2c7a3f;
      color: #2c7a3f;
      font-weight: 600;
    }

    #nova-stranka-save-object-btn:hover,
    #nov-objekt-save-project-btn:hover {
      background: #eaf5ec;
    }

    #nova-stranka-cancel-btn:hover,
    #nov-objekt-cancel-btn:hover {
      background: #ededed;
    }

    #dobavnice-import-list {
      flex: 1;
      min-height: 180px;
      overflow-y: auto;
      padding: 12px 18px;
    }

    .dobavnice-import-item {
      display: grid;
      grid-template-columns: 24px minmax(0, 1fr) auto;
      align-items: center;
      gap: 8px;
      min-height: 34px;
      border-bottom: 1px solid #eee;
      font-size: 13px;
    }

    .dobavnice-import-item-name {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .dobavnice-import-item-status {
      color: #666;
      white-space: nowrap;
    }

    #dobavnice-import-summary {
      padding: 12px 18px;
      border-top: 1px solid #ddd;
      background: #f7f7f7;
      font-size: 13px;
      font-weight: 700;
    }

    .dobavnice-import-actions {
      display: flex;
      justify-content: flex-end;
      padding: 12px 18px 16px;
    }

    #dobavnice-import-close-btn {
      padding: 8px 14px;
      border: 1px solid #777;
      border-radius: 4px;
      background: #fff;
      cursor: pointer;
    }

    #dobavnice-import-close-btn:disabled {
      opacity: 0.5;
      cursor: default;
    }

    .prisotnost-module {
      height: 100%;
      min-height: 0;
      display: flex;
      flex-direction: column;
    }

    .prisotnost-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }

    .prisotnost-header h2 {
      margin: 0;
    }

    .prisotnost-view-toggle,
    .prisotnost-period-toolbar {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      margin-bottom: 12px;
    }

    .prisotnost-view-btn,
    #prisotnost-prev-btn,
    #prisotnost-next-btn,
    #prisotnost-period-btn,
    #prisotnost-refresh-btn {
      border: 1px solid #2c7a3f;
      border-radius: 4px;
      background: #fff;
      color: #2c7a3f;
      cursor: pointer;
      padding: 7px 12px;
      font-weight: 700;
    }

    .prisotnost-view-btn.active {
      background: #2c7a3f;
      color: #fff;
    }

    #prisotnost-period-btn {
      min-width: 210px;
      color: #222;
      border-color: #bbb;
    }

    #prisotnost-content {
      flex: 1;
      min-height: 0;
      overflow: auto;
    }

    .prisotnost-weekdays {
      display: grid;
      grid-template-columns: repeat(7, minmax(120px, 1fr));
      min-width: 840px;
      border: 1px solid #d7d7d7;
      border-bottom: 0;
      background: #f3f3f3;
    }

    .prisotnost-weekdays > div {
      padding: 8px;
      border-right: 1px solid #d7d7d7;
      text-align: center;
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
    }

    .prisotnost-weekdays > div:last-child {
      border-right: 0;
    }

    .prisotnost-month-grid {
      display: grid;
      grid-template-columns: repeat(7, minmax(120px, 1fr));
      min-width: 840px;
      border-left: 1px solid #d7d7d7;
      border-top: 1px solid #d7d7d7;
    }

    .prisotnost-day-cell {
      min-height: 150px;
      border: 0;
      border-right: 1px solid #d7d7d7;
      border-bottom: 1px solid #d7d7d7;
      border-radius: 0;
      background: #fff;
      padding: 8px;
      text-align: left;
      vertical-align: top;
      cursor: pointer;
      color: #222;
    }

    .prisotnost-day-cell:hover {
      background: #f5f8f6;
    }

    .prisotnost-day-cell.empty {
      background: #f4f4f4;
      cursor: default;
    }

    .prisotnost-day-cell.today {
      box-shadow: inset 0 0 0 2px #2c7a3f;
    }

    .prisotnost-day-number {
      margin-bottom: 7px;
      font-size: 14px;
      font-weight: 700;
    }

    .prisotnost-day-members {
      display: flex;
      flex-wrap: wrap;
      gap: 4px 8px;
      margin-bottom: 8px;
    }

    .prisotnost-day-clan {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 12px;
      font-weight: 700;
    }

    .prisotnost-day-initials {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 24px;
      height: 24px;
      padding: 0 4px;
      border-radius: 12px;
      background: #e7f1e9;
      color: #2c7a3f;
      box-sizing: border-box;
    }

    .prisotnost-day-hours::after {
      content: " h";
      font-weight: 400;
    }

    .prisotnost-day-locations {
      font-size: 12px;
      line-height: 1.35;
    }

    .prisotnost-day-object {
      margin-top: 5px;
      font-weight: 700;
    }

    .prisotnost-day-project {
      padding-left: 10px;
      color: #666;
    }

    .prisotnost-loading,
    .prisotnost-error {
      padding: 20px;
      color: #666;
    }

    .prisotnost-day-view {
      min-width: 0;
      border: 1px solid #d7d7d7;
      background: #fff;
    }

    .prisotnost-timeline-scroll {
      overflow-x: auto;
      overflow-y: visible;
      padding-left: 180px;
    }

    .prisotnost-timeline-header {
      height: 36px;
      display: flex;
      border-bottom: 1px solid #d7d7d7;
      background: #f3f3f3;
    }

    .prisotnost-timeline-hour {
      flex: 0 0 auto;
      box-sizing: border-box;
      border-left: 1px solid #ddd;
      padding: 8px 4px;
      font-size: 11px;
      color: #666;
    }

    .prisotnost-timeline-row {
      position: relative;
      min-height: 58px;
      display: flex;
    }

    .prisotnost-timeline-clan {
      position: absolute;
      left: -180px;
      top: 0;
      bottom: 0;
      width: 180px;
      display: flex;
      align-items: center;
      gap: 8px;
      box-sizing: border-box;
      border-right: 1px solid #d7d7d7;
      border-bottom: 1px solid #e5e5e5;
      background: #fff;
      padding: 8px 10px;
      z-index: 2;
    }

    .prisotnost-timeline-initials {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 30px;
      height: 30px;
      padding: 0 5px;
      border-radius: 15px;
      background: #e7f1e9;
      color: #2c7a3f;
      font-size: 12px;
      font-weight: 700;
      box-sizing: border-box;
    }

    .prisotnost-timeline-name {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 13px;
      font-weight: 700;
    }

    .prisotnost-timeline-track {
      position: relative;
      flex: 0 0 auto;
      min-height: 58px;
      box-sizing: border-box;
      border-bottom: 1px solid #e5e5e5;
      background-image: repeating-linear-gradient(
        to right,
        transparent 0,
        transparent 59px,
        #ececec 59px,
        #ececec 60px
      );
    }

    .prisotnost-timeline-bar {
      position: absolute;
      top: 10px;
      height: 38px;
      display: flex;
      align-items: center;
      overflow: hidden;
      box-sizing: border-box;
      border: 1px solid #2c7a3f;
      border-radius: 4px;
      background: #e7f1e9;
      color: #1f3b2a;
      padding: 0 7px;
      font-size: 11px;
      font-weight: 700;
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    .obisk-delo-item {
      margin-bottom: 10px;
      padding: 14px 16px;
      border: 1px solid #d9e3dc;
      border-left: 4px solid #2c7a3f;
      border-radius: 4px;
      background: #fff;
      box-shadow: 0 1px 2px rgba(31, 59, 42, 0.05);
    }

    .obisk-delo-title-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }

    .obisk-delo-title {
      color: #1f3b2a;
      font-size: 14px;
      font-weight: 700;
    }

    .obisk-delo-edit-btn {
      flex: 0 0 auto;
      padding: 5px 9px;
      font-size: 11px;
    }

    .obisk-delo-opis {
      margin-top: 10px;
      color: #39443d;
      font-size: 13px;
      line-height: 1.5;
      white-space: pre-wrap;
    }

    .obisk-delo-status {
      display: inline-block;
      margin-top: 12px;
      padding: 3px 8px;
      border: 1px solid #cfe5d5;
      border-radius: 3px;
      background: #edf8ef;
      color: #246b36;
      font-size: 10px;
      font-weight: 700;
    }
    .obisk-delo-modal {
      width: min(720px, calc(100vw - 40px));
    }

    .obisk-delo-form {
      display: flex;
      flex-direction: column;
      gap: 18px;
      padding: 18px 20px 20px;
    }

    .obisk-delo-form label {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 7px;
      color: #1f3b2a;
      font-size: 14px;
      font-weight: 700;
    }

    .obisk-delo-form input,
    .obisk-delo-form textarea {
      width: 100%;
      box-sizing: border-box;
      padding: 10px 12px;
      border: 1px solid #b9c9bf;
      border-radius: 6px;
      background: #fff;
      color: #222;
      font: inherit;
    }

    .obisk-delo-form textarea {
      min-height: 150px;
      resize: vertical;
      line-height: 1.45;
    }

    .obisk-delo-form .material-modal-actions {
      margin-top: 2px;
    }