html,
body {
  height: 100%;
}

body {
  font-size: .875rem;
}
.form-signin {
  width: 100%;
  max-width: 330px;
  padding: 15px;
  margin: auto;
}
.form-signin .checkbox {
  font-weight: 400;
}
.form-signin .form-control {
  position: relative;
  box-sizing: border-box;
  height: auto;
  padding: 10px;
  font-size: 16px;
}
.form-signin .form-control:focus {
  z-index: 2;
}
.form-signin input[type="email"] {
  margin-bottom: -1px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}
.form-signin input[type="password"] {
  margin-bottom: 10px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.feather {
  width: 16px;
  height: 16px;
  vertical-align: text-bottom;
}

/*
 * Sidebar
 */

.sidebar {
  position: fixed;
  top: 0;
  /* rtl:raw:
  right: 0;
  */
  bottom: 0;
  /* rtl:remove */
  left: 0;
  z-index: 100; /* Behind the navbar */
  padding: 48px 0 0; /* Height of navbar */
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

@media (max-width: 767.98px) {
  .sidebar {
    top: 5rem;
  }
}

.sidebar-sticky {
  position: relative;
  top: 0;
  height: calc(100vh - 48px);
  padding-top: .5rem;
  overflow-x: hidden;
  overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
}

.sidebar .nav-link {
  font-weight: 500;
  color: #333;
}

.sidebar .nav-link .feather {
  margin-right: 4px;
  color: #727272;
}

.sidebar .nav-link.active {
  color: #007bff;
}

.sidebar .nav-link:hover .feather,
.sidebar .nav-link.active .feather {
  color: inherit;
}

.sidebar-heading {
  font-size: .75rem;
  text-transform: uppercase;
}

/*
 * Navbar
 */

.navbar-brand {
  padding-top: .75rem;
  padding-bottom: .75rem;
  font-size: 1rem;
  background-color: rgba(0, 0, 0, .25);
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25);
}
.navbar .navbar-toggler {
  top: .25rem;
  right: 1rem;
}

.navbar .form-control {
  padding: .75rem 1rem;
  border-width: 0;
  border-radius: 0;
}
.form-control-dark {
  color: #fff;
  background-color: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .1);
}
.form-control-dark:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}

.clear {
	clear: both;

}

.comment_list {
	max-height: 100px;
    overflow: scroll;
	height: 150px;
}

.org_table td{
	border: none !important; 
}



.org_header {
    background: #CCCCFF;
    margin-bottom: 5px;
    font-size: 10pt;
    font-weight: bold;	
	font-size: 14px;
	padding: 2px;
}

.org_td_header {
    font-weight: bold;	
	
}

table#contacts tr:nth-child(odd) {
    background-color: #eeeeee;
}

table.slide_1_to_m {
    border: 1px dashed gray;
    border-top: 1px dashed gray;
    margin-bottom: 10px 0;
}

table.slide_1_to_m td, .slide_1_to_m select {
    font-size: 9pt;
    padding: 5px;
}

table.without_border td{
	border: 0 !important;
}

/* Отображение статуса в таблице в виде галочки или крестика */
.status-yes { color: green; }
.status-no  { color: red; }



/* Administrative panel: local styles, shared light and dark palettes. */
:root {
  color-scheme: light;
  --page: #f4f5f7; --surface: #fff; --surface-alt: #f8f9fb;
  --text: #20262e; --muted: #66717f; --border: #dfe3e8;
  --accent: #285b47; --accent-hover: #1e4938; --accent-soft: #e8f2ec;
  --danger: #b12c36; --danger-bg: #fff0f1;
  --sidebar-width: max(15%, 230px);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #14191d; --surface: #1d242a; --surface-alt: #252d35;
  --text: #edf1f5; --muted: #a4b0bc; --border: #37424c;
  --accent: #8fd4ad; --accent-hover: #b0e7c7; --accent-soft: #293e33;
  --danger: #ffb1b8; --danger-bg: #3b252d;
}
* { box-sizing: border-box; }
.admin-app { margin: 0; background: var(--page); color: var(--text); font: 14px/1.55 system-ui, -apple-system, sans-serif; }
.admin-app a { color: var(--accent); text-underline-offset: 3px; }
.admin-app h1 { font-size: clamp(24px, 3vw, 32px); line-height: 1.25; margin: 8px 0 14px; }
.admin-app h2 { font-size: 19px; }
.admin-app button, .admin-app input, .admin-app select, .admin-app textarea { font: inherit; }
.admin-app :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.admin-app .sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); height: 100dvh; padding: 24px 16px 16px; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border); box-shadow: none; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 0 12px 24px; text-decoration: none; font-weight: 650; }
.brand img { width: 125px; max-height: 60px; object-fit: contain; background: #285b47; border-radius: 6px; padding: 8px; }
.sidebar-nav { overflow-y: auto; min-height: 0; padding: 0 4px; flex: 1; }
.admin-app .sidebar-heading { color: var(--muted); font-size: 10px; letter-spacing: .12em; margin: 8px 10px; }
.admin-app .sidebar .nav-link { display: block; border-radius: 7px; padding: 8px 10px; color: var(--text); text-decoration: none; font-size: 13px; }
.admin-app .sidebar .nav-link:hover { background: var(--surface-alt); }
.admin-app .sidebar .nav-link.active { color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.admin-app hr { border: 0; border-top: 1px solid var(--border); margin: 18px 10px; }
.sidebar-footer { margin-top: 16px; padding: 16px 10px 0; border-top: 1px solid var(--border); }
.theme-control { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.theme-control input { appearance: none; width: 38px; height: 22px; border: 1px solid var(--border); border-radius: 20px; background: var(--muted); position: relative; cursor: pointer; flex-shrink: 0; }
.theme-control input::after { content: ''; width: 16px; height: 16px; background: white; border-radius: 50%; position: absolute; top: 2px; left: 2px; transition: transform .15s; }
.theme-control input:checked { background: var(--accent); }
.theme-control input:checked::after { transform: translateX(16px); }
.user-name { overflow-wrap: anywhere; margin: 16px 0 8px; }
.user-name small { display: block; color: var(--muted); }
.workspace { margin-left: var(--sidebar-width); padding: clamp(20px, 3vw, 44px); min-width: 0; }
.mobile-header { display: none; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.eyebrow { color: var(--muted); text-transform: uppercase; font-size: 10px; letter-spacing: .16em; margin: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-bottom: 24px; }
.admin-app .btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 40px; border-radius: 7px; padding: 8px 16px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; cursor: pointer; white-space: nowrap; }
.admin-app .btn:hover { background: var(--surface-alt); }
.admin-app .btn-primary { background: var(--accent); border-color: var(--accent); color: var(--surface); font-weight: 650; }
.admin-app .btn-primary:hover { background: var(--accent-hover); }
.admin-app .btn-danger { color: var(--danger); background: var(--danger-bg); border-color: var(--danger); }
.admin-app .btn-logout { width: 100%; }
.report-sort { display: inline-flex; gap: 4px; margin-left: 8px; }
.admin-app .report-sort .btn { min-height: 32px; padding: 4px 9px; }
.admin-app .report-sort .btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.table-scroll { overflow-x: auto; padding: 0; }
.admin-app table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.admin-app th { background: var(--surface-alt); color: var(--muted); font-weight: 600; white-space: nowrap; }
.admin-app th, .admin-app td { padding: 13px 16px; border-bottom: 1px solid var(--border); }
.admin-app td { max-width: 340px; overflow-wrap: anywhere; }
.admin-app th.corner-column, .admin-app td.corner-column { width: 150px; min-width: 150px; max-width: 150px; white-space: normal; overflow-wrap: anywhere; }
.admin-app th.name-column, .admin-app td.name-column { width: 150px; min-width: 150px; max-width: 150px; white-space: normal; overflow-wrap: anywhere; }
.admin-app th.iiko-column, .admin-app td.iiko-column { width: 150px; min-width: 150px; max-width: 150px; white-space: normal; overflow-wrap: anywhere; }
.admin-app th.data-column, .admin-app td.data-column { width: 130px; min-width: 130px; max-width: 130px; white-space: normal; overflow-wrap: anywhere; }
.employee-table th:nth-child(2), .employee-table td:nth-child(2),
.employee-table th:nth-child(3), .employee-table td:nth-child(3) { min-width: 140px; white-space: nowrap; }
.admin-app tbody tr:last-child td { border-bottom: 0; }
.admin-app tbody tr:hover { background: var(--surface-alt); }
.actions { white-space: nowrap; }
.actions a + a { margin-left: 14px; }
.empty { padding: 40px 24px !important; text-align: center; color: var(--muted); }
.search-form { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 0 20px; }
.search-form input[type="search"] { width: min(100%, 380px); }
.admin-app input:not([type="checkbox"]):not([type="hidden"]), .admin-app select, .admin-app textarea { border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; color: var(--text); background: var(--surface); max-width: 100%; }
.admin-app input[readonly] { background: var(--surface-alt) !important; color: var(--muted) !important; }
.editor { max-width: 850px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-weight: 600; }
.field small, .muted { color: var(--muted); }
.field textarea { resize: vertical; min-height: 100px; }
.field:has(textarea) { grid-column: 1 / -1; }
.field-check { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; }
.field-check input { width: 20px; height: 20px; accent-color: var(--accent); }
.field-check small { flex-basis: 100%; }
.field-error { color: var(--danger); font-size: 12px; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 12px; border-top: 1px solid var(--border); padding-top: 20px; }
.alert { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger); padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; }
.alert a { color: inherit; }
.detail-grid { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 12px 24px; }
.detail-grid dt { color: var(--muted); }
.detail-grid dd { margin: 0; overflow-wrap: anywhere; }
.pre-wrap { white-space: pre-wrap; font-family: ui-monospace, monospace; }
.logs-table td { vertical-align: top; }
.admin-app textarea.log-json { box-sizing: border-box; width: 350px; min-width: 350px; min-height: calc(15em + 22px); font-family: ui-monospace, monospace; font-size: 13px; line-height: 1.5; white-space: pre; overflow-wrap: normal; overflow: auto; resize: both; }
.admin-app textarea.log-json-detail { width: 100%; min-width: min(500px, 100%); resize: vertical; }
.pagination, .related-links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.pagination { justify-content: flex-end; color: var(--muted); margin-top: 20px; }
.badge { background: var(--accent-soft); color: var(--accent); padding: 4px 10px; border-radius: 30px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.login-page { display: grid; place-items: center; min-height: 100dvh; padding: 24px; background: radial-gradient(ellipse at top left, var(--accent-soft), transparent 60%), var(--page); }
.login-card { width: min(100%,460px); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 36px; box-shadow: 0 20px 70px #0000000a; }
.login-logo { display: block; width: 180px; max-height: 120px; object-fit: contain; margin: 0 auto 32px; padding: 12px; background: #285b47; border-radius: 8px; }
.login-card .form-signin { max-width: none; padding: 0; margin-top: 24px; }
.login-card .field { margin-bottom: 18px; }
.login-card .btn { width: 100%; }
@media (max-width: 800px) {
  .mobile-header { display: flex; position: sticky; top: 0; z-index: 110; align-items: center; justify-content: space-between; gap: 12px; height: 64px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
  .admin-app .sidebar { display: none; top: 64px; width: min(310px,100%); height: calc(100dvh - 64px); box-shadow: 20px 0 60px #0003; }
  .admin-app.menu-open .sidebar { display: flex; }
  .workspace { margin-left: 0; padding: 20px 16px; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; }
  .editor { grid-template-columns: 1fr; padding: 18px; }
  .detail-grid { grid-template-columns: 1fr; gap: 5px; }
  .detail-grid dd { margin-bottom: 14px; }
  .search-form input[type="search"] { flex-basis: 100%; width: 100%; }
  .login-card { padding: 26px; }
}

.report-filters { display: flex; flex-wrap: wrap; align-items: flex-end; }
.admin-app .report-filters .field > input, .admin-app .report-filters > .btn { height: 44px; }
.time-report-filters { gap: 16px; }
.time-report-hint { flex-basis: 100%; margin: 0; }
.time-report-details { margin: 8px 0; }
.time-report-details > summary { cursor: pointer; padding: 10px 0; font-weight: 600; }
.time-report-details > .table-scroll { margin-top: 12px; }
