:root {
  --sidebar-bg: #8dcdbb;
  --bg: #f4f7f6;
  --card-bg: #ffffff;
  --text: #1f2a2e;
  --muted: #7e8b8f;
  --primary: #7cc7b4;
  --primary-dark: #63b8a2;
  --border: #e7eceb;
  --danger: #e05555;
  --success: #4bb982;
  --blue: #4a7bdc;
  --purple: #8a67d4;
  --orange: #e58a4c;
  --teal: #3aa0a3;
  --sidebar-width: 280px;
  --sidebar-width-collapsed: 90px;
  --topbar-height: 64px;
}

* { box-sizing: border-box; }

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Helvetica Neue", "Trebuchet MS", sans-serif;
  color: var(--text);
  background: var(--bg);
}

a { color: inherit; text-decoration: none; }

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: #ffffff;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 40;
}

.sidebar-top {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar-toggle svg {
  width: 28px;
  height: 28px;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
}

.subtitle {
  font-size: 14px;
  opacity: 0.8;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  color: #ffffff;
  font-size: 14px;
  opacity: 0.95;
}

.menu a .icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.menu a.active,
.menu a:hover {
  background: rgba(255, 255, 255, 0.22);
  opacity: 1;
}

.sidebar-user {
  margin-top: auto;
  position: relative;
}

.sidebar-user-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px 0;
}

.sidebar-user-trigger .chevron {
  width: 16px;
  height: 16px;
  margin-left: auto;
  opacity: 0.8;
}

.sidebar-user .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

.sidebar-user .user-info {
  font-size: 13px;
  line-height: 1.2;
}

.sidebar-user .user-info .email {
  opacity: 0.8;
  font-size: 12px;
}

.sidebar-user-dropdown .dropdown-menu {
  left: 0;
  right: auto;
  top: auto;
  bottom: calc(100% + 8px);
  width: 100%;
  padding: 10px;
  border-radius: 16px;
}

.sidebar.collapsed {
  width: var(--sidebar-width-collapsed);
  padding: 18px 10px;
}

.sidebar.collapsed .sidebar-top {
  align-items: center;
  gap: 10px;
}

.sidebar.collapsed .sidebar-toggle {
  position: static;
  margin-bottom: 6px;
}

.sidebar.collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

.sidebar.collapsed .brand {
  font-size: 18px;
}

.sidebar.collapsed .subtitle {
  display: none;
}

.sidebar.collapsed .menu {
  align-items: center;
  gap: 14px;
}

.sidebar.collapsed .menu a {
  width: 58px;
  justify-content: center;
  padding: 10px 0;
}

.sidebar.collapsed .menu a .label {
  display: none;
}

.sidebar.collapsed .menu a.active,
.sidebar.collapsed .menu a:hover {
  box-shadow: 0 6px 16px rgba(31, 42, 46, 0.18);
}

.sidebar.collapsed .sidebar-user-trigger {
  justify-content: center;
  padding: 10px 0 0;
}

.sidebar.collapsed .sidebar-user .user-info,
.sidebar.collapsed .sidebar-user-trigger .chevron {
  display: none;
}

.sidebar.collapsed .sidebar-user-dropdown .dropdown-menu {
  left: calc(100% + 8px);
  bottom: 0;
  width: 200px;
}

.sidebar-user-dropdown .dropdown-menu a,
.sidebar-user-dropdown .dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  padding: 6px 4px;
}

.sidebar-user-dropdown .dropdown-menu .icon { width: 14px; height: 14px; }

.sidebar-user-dropdown .dropdown-menu .danger {
  color: var(--danger);
  font-weight: 600;
}

.sidebar-user-dropdown .dropdown-menu form {
  margin: 0;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-left: var(--sidebar-width);
}

.topbar {
  background: #ffffff;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  z-index: 50;
}

.company-switch {
  display: flex;
  align-items: center;
  gap: 10px;
}

.company-chip {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}
.company-chip.logo {
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
}

.topbar select {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  background: #ffffff;
}

.content {
  padding: 22px 28px 32px;
  margin-top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
  overflow-y: auto;
}

.sidebar.collapsed + .main {
  margin-left: var(--sidebar-width-collapsed);
}

.sidebar.collapsed + .main .topbar {
  left: var(--sidebar-width-collapsed);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
}

.page-subtitle {
  color: var(--muted);
  font-size: 12px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.back-link .icon {
  width: 14px;
  height: 14px;
}

.header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-section-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 10px 0;
}

.form-actions {
  display: flex;
  gap: 8px;
}

.file-input {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-input input[type="file"] {
  position: absolute;
  left: -9999px;
}

.file-name {
  font-size: 12px;
  color: var(--muted);
}

.page-actions {
  display: flex;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--primary);
  color: #ffffff;
  font-size: 12px;
  cursor: pointer;
}

.btn:hover { background: var(--primary-dark); }

.btn.secondary {
  background: #ffffff;
  color: var(--text);
  border-color: var(--border);
}

.btn.secondary:hover {
  background: #f7faf9;
}

.btn.danger {
  background: var(--danger);
  color: #ffffff;
}

.btn.danger:hover {
  background: #d24646;
}

.btn.icon {
  padding: 8px 10px;
}

.btn.small {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 10px;
}

.btn .icon {
  width: 14px;
  height: 14px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(28, 48, 45, 0.04);
}

.filters input,
.filters select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  background: #ffffff;
}

.positions-filters,
.users-filters,
.realizations-filters {
  grid-template-columns: minmax(260px, 1.6fr) repeat(2, minmax(160px, 0.8fr));
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: #ffffff;
}

.positions-filters {
  grid-template-columns: minmax(320px, 1fr);
}

.realizations-filters {
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, 0.9fr));
}

.users-filters .search-input,
.positions-filters .search-input,
.realizations-filters .search-input {
  height: 44px;
  font-size: 13px;
  background-color: #f7f9f8;
  border-color: #e8edec;
  border-radius: 12px;
}

.users-filters select,
.positions-filters select,
.realizations-filters select {
  height: 44px;
  font-size: 13px;
  border-radius: 12px;
  border-color: #e8edec;
  background: #f7f9f8;
}

.employees-filters {
  grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(160px, 0.8fr));
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: #ffffff;
}

.employees-filters .search-input {
  height: 40px;
  font-size: 13px;
  background-color: #f7f9f8;
  border-color: #e8edec;
  border-radius: 10px;
}

.employees-filters select {
  height: 40px;
  font-size: 13px;
  border-radius: 10px;
  border-color: #e8edec;
  background: #f7f9f8;
}

.search-input {
  padding-left: 30px;
  background: #ffffff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2390a4ae' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") no-repeat 10px center;
  background-size: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid label {
  font-size: 12px;
  color: var(--muted);
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
}

.employee-card .form-grid input,
.employee-card .form-grid select,
.employee-card .form-grid textarea {
  background: #f7f9f8;
  border-color: #e8edec;
  height: 38px;
}

.employee-edit {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.employee-edit-header {
  align-items: flex-start;
}

.employee-card {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #ffffff;
  padding: 16px;
}

.employee-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.employee-grid .full {
  grid-column: span 2;
}

.employee-grid .empty-field {
  display: none;
}

.profile-upload {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  margin-bottom: 14px;
  align-items: center;
}

.profile-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e6f6f1;
  color: #5bb9a5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 6px 16px rgba(46, 156, 130, 0.15);
  overflow: hidden;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-drop {
  border: 1px dashed #d7dfde;
  background: #f7f9f8;
  border-radius: 12px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.upload-drop.has-image .upload-placeholder {
  display: none;
}

.upload-drop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.25);
  opacity: 0;
}

.upload-drop.has-image::after {
  opacity: 1;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.upload-placeholder svg {
  width: 20px;
  height: 20px;
}

.upload-btn {
  width: 100%;
  justify-content: center;
}

.employee-card input[type="file"] {
  position: absolute;
  left: -9999px;
}

.password-card {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #d7efea;
  border-radius: 12px;
  background: #f6fcfa;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.password-title {
  font-weight: 600;
  font-size: 13px;
}

.password-info {
  font-size: 11px;
  color: var(--muted);
}

.password-result {
  font-size: 12px;
  color: var(--text);
}

.password-error {
  font-size: 12px;
  color: var(--danger);
}

.field-note {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}

.company-selector {
  margin-top: 12px;
}

.company-selector label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.company-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.company-pill-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e2e8e6;
  background: #ffffff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
}

.company-pill-option input {
  display: none;
}

.company-pill-option input:checked + span {
  color: #ffffff;
  position: relative;
  z-index: 1;
}

.company-pill-option input:checked {
  display: none;
}

.company-pill-option input:checked + span {
  position: relative;
}

.company-pill-option input:checked + span::before {
  content: "";
  position: absolute;
  inset: -6px -10px;
  border-radius: 999px;
  background: #7cc7b4;
  z-index: -1;
}

.pay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.pay-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pay-card.highlight {
  border-color: #bfe8dc;
  background: #f6fcfa;
}

.pay-title {
  font-size: 12px;
  font-weight: 600;
}

.pay-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f4f7f6;
}

.pay-input input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 12px;
}

.pay-input span {
  font-size: 11px;
  color: var(--muted);
}

.pay-note {
  font-size: 10px;
  color: var(--muted);
}

.pay-summary {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.pay-value {
  font-weight: 600;
  color: var(--text);
}

.preview-card {
  background: #e9f6f4;
  border-color: #cfe9e1;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.preview-label {
  font-size: 11px;
  color: var(--muted);
}

.preview-value {
  font-weight: 600;
  font-size: 12px;
}

.status-active {
  color: var(--success);
}

.status-inactive {
  color: var(--danger);
}

.section {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(28, 48, 45, 0.04);
}

.dashboard-section {
  background: transparent;
  border: none;
  padding: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.users-stats {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.realizations-stats {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 2px 10px rgba(28, 48, 45, 0.04);
}

.card h4 {
  margin: 0 0 6px 0;
  font-size: 12px;
  color: var(--muted);
}

.card .value {
  font-size: 18px;
  font-weight: 700;
}

.stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef4f3;
}

.stat-icon svg {
  width: 14px;
  height: 14px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-card .label {
  font-size: 12px;
  color: var(--muted);
}

.realizations-stats .value.success { color: var(--success); }
.realizations-stats .value.danger { color: var(--danger); }

.stat-card.simple {
  gap: 6px;
}

.stat-card.simple .stat-icon {
  display: none;
}

.stat-card.simple .value {
  font-size: 20px;
}

.stat-card .value.purple { color: var(--purple); }
.stat-card .value.blue { color: var(--blue); }
.stat-card .value.green { color: var(--success); }

.table-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(28, 48, 45, 0.04);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  text-align: left;
}

.email-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.email-cell .icon {
  width: 14px;
  height: 14px;
}

.text-action {
  color: var(--text);
  font-weight: 600;
  font-size: 12px;
}

.text-action:hover {
  color: var(--primary-dark);
}

.table input,
.table select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
}

.table th {
  color: var(--muted);
  font-weight: 600;
  background: #f8fbfa;
}

.table.actions-right th:last-child,
.table.actions-right td:last-child {
  text-align: right;
}

.positions-table th:nth-child(2),
.positions-table td:nth-child(2) {
  text-align: center;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background: #f4fbf8;
}

.employee-section {
  padding: 0;
  overflow: hidden;
}

.employee-section .section-header {
  padding: 14px 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}

.employee-table td:first-child {
  width: 240px;
}

.name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.employee-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e6f6f1;
  color: #5bb9a5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.4px;
}

.company-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 10px;
  border: 1px solid #e2e8e6;
  background: #ffffff;
  font-size: 11px;
  font-weight: 600;
  margin-right: 6px;
  margin-bottom: 4px;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: #ffffff;
}

.table-footer .per-page {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.table-footer select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f7f9f8;
  font-size: 12px;
}

.pagination.compact {
  margin-top: 0;
}

.pagination.compact .btn.secondary {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 10px;
}

.table-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.table-actions form {
  margin: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.icon-btn:hover {
  border-color: #cfe7df;
  background: #f4fbf8;
}

.icon-btn.mint {
  border-color: #bfe8dc;
  color: #4bb982;
}

.icon-btn.mint:hover {
  background: #e9f6f4;
}

.icon-btn.danger {
  color: var(--danger);
  border-color: #f2c0c0;
  background: #fff5f5;
}

.icon-btn.danger:hover {
  border-color: #e07a7a;
  background: #ffecec;
}

.icon-btn .icon { width: 14px; height: 14px; }

.icon-btn.danger { border-color: #f3c2c2; color: var(--danger); }

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #f0faf7;
  color: #60b59d;
  font-weight: 700;
  font-size: 12px;
}

.shift-types-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 16px;
  margin-bottom: 16px;
  align-items: start;
}

.shift-form-card {
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(28, 48, 45, 0.05);
}

.shift-form-card h4 {
  font-size: 14px;
  margin: 0 0 12px 0;
}

.shift-form-card input,
.shift-form-card select {
  background: #f7f9f8;
  border-color: #e8edec;
  height: 38px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.switch {
  position: relative;
  width: 38px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #dbe7e4;
  border-radius: 999px;
  transition: 0.2s ease;
}

.slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #ffffff;
  transition: 0.2s ease;
}

.switch input:checked + .slider {
  background: #8dcdbb;
}

.switch input:checked + .slider::before {
  transform: translateX(18px);
}

.shift-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 10px rgba(28, 48, 45, 0.05);
}

.shift-card .shift-title { font-size: 13px; font-weight: 600; }
.shift-card .shift-meta { font-size: 11px; color: var(--muted); }

.shift-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.shift-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.shift-actions-row form {
  margin: 0;
}

.shift-actions-row .btn.small {
  flex: 1;
  justify-content: center;
}

.shift-actions-row .btn.secondary {
  border-color: #bfe8dc;
  color: #4bb982;
  background: #f6fcfa;
}

.shift-actions-row .btn.secondary:hover {
  background: #e9f6f4;
}

.shift-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  background: #eef7f3;
  color: #5ebaa3;
  width: fit-content;
}

.badge.success { background: #e6f6ee; color: var(--success); }
.badge.danger { background: #fbe7e7; color: var(--danger); }
.badge.info { background: #e8f0ff; color: var(--blue); }
.badge.purple { background: #efe8ff; color: var(--purple); }
.badge.muted { background: #f1f3f4; color: #7a8a8d; }

.shift-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}

.shift-badge.cela { background: #e6f6ee; color: var(--success); }
.shift-badge.pola { background: #e8f0ff; color: var(--blue); }
.shift-badge.pola_plus { background: #efe8ff; color: var(--purple); }

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.pagination .per-page {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.pagination .per-page select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f7f9f8;
  font-size: 12px;
}

.pagination .label { font-size: 12px; color: var(--muted); }

.schedule-section {
  padding: 16px;
}

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

.schedule-toolbar .nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 10px;
}

.schedule-range {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  min-width: 160px;
  text-align: center;
}

.schedule-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: #f0f2f1;
  border-radius: 12px;
  margin-bottom: 16px;
}

.schedule-tab {
  flex: 1;
  text-align: center;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  border: 1px solid transparent;
}

.schedule-tab.active {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: 0 2px 6px rgba(28, 48, 45, 0.08);
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.day-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.day-header {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  background: #8dcdbb;
  border-radius: 10px;
}

.shift-section {
  border: 1px solid #edf2f1;
  border-radius: 12px;
  padding: 8px;
  background: #f9fbfa;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shift-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.shift-label.primary {
  background: #e6f0ff;
  color: #4a7bdc;
}

.shift-label.secondary {
  background: #f1e9ff;
  color: #8a67d4;
}

.role-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.role-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  color: #7a8a8d;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.add-link {
  font-size: 10px;
  font-weight: 600;
  color: #67bfa9;
}

button.add-link {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

.entry-card {
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.entry-card.empty {
  background: #ffffff;
  border: 1px dashed #e3ecea;
  border-radius: 10px;
  padding: 6px 8px;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
}

.entry-field {
  position: relative;
  background: #ffffff;
  border: 1px solid #e5eceb;
  border-radius: 10px;
  padding: 6px 22px 6px 8px;
  font-size: 10px;
  color: #2f3a3d;
}

.entry-field::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #9aa8ab;
  transform: translateY(-20%);
}

.schedule-entry-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  background: #ffffff;
  border: 1px solid #e3ecea;
  border-radius: 12px;
  padding: 8px 8px 8px 10px;
  position: relative;
}

.schedule-entry-form .entry-fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.schedule-entry-form select {
  width: 100%;
  padding: 7px 28px 7px 10px;
  border: 1px solid #e7eceb;
  border-radius: 10px;
  background: #f4f6f5;
  font-size: 11px;
  color: #2f3a3d;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%239aa8ab' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.schedule-entry-form .entry-actions {
  position: absolute;
  right: 6px;
  top: 6px;
}

.schedule-entry-form .entry-actions .icon-btn {
  width: 22px;
  height: 22px;
  border-radius: 7px;
}

.role-block .schedule-entry-form + .schedule-entry-form {
  margin-top: 8px;
}

.schedule-stats-panel {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: #ffffff;
}

.stats-section {
  margin-bottom: 16px;
}

.stats-section:last-child {
  margin-bottom: 0;
}

.stats-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.stats-card {
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f6f9ff;
}

.stats-card.purple {
  border-color: #e1d7f7;
  background: #faf7ff;
}

.stats-card strong {
  color: #4a7bdc;
}

.stats-card.purple strong {
  color: #8a67d4;
}

.stats-name {
  font-weight: 600;
  font-size: 11px;
  margin-bottom: 6px;
}

.stats-row {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

.stats-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 16px 0;
  text-align: center;
}

.schedule-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
}

.schedule-stats .card {
  margin-bottom: 12px;
}

.tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: #f0f3f2;
  border-radius: 12px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  cursor: pointer;
}

.tab-btn.active {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: 0 2px 6px rgba(28, 48, 45, 0.08);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(31, 42, 46, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.active { display: flex; }

.modal-card {
  width: min(720px, 92vw);
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 20px;
}

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

.modal-title { font-size: 16px; font-weight: 700; }

.modal-close { cursor: pointer; }

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

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  display: none;
  min-width: 120px;
  z-index: 20;
  box-shadow: 0 10px 24px rgba(28, 48, 45, 0.12);
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
}

.dropdown-menu a:hover { background: #f4f7f6; }

.dropdown.open .dropdown-menu { display: block; }

.no-print { }

.grid-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.grid-2.equal-columns {
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.grid-2.equal-columns > .card {
  height: 100%;
}

.dashboard-grid {
  grid-template-columns: 1fr 1fr;
}

.dashboard-panel {
  padding: 18px 20px;
  border-radius: 18px;
  box-shadow: 0 2px 10px rgba(28, 48, 45, 0.04);
}

.section-title {
  margin: 0 0 14px 0;
  font-size: 16px;
  font-weight: 700;
}

.action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.list-item:last-child { border-bottom: none; }

.list-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 6px;
  flex: 0 0 8px;
}

.list-title { font-size: 12px; font-weight: 600; }
.list-subtitle { font-size: 11px; color: var(--muted); }

.action-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #ffffff;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.action-card:hover {
  border-color: #7cc7b4;
  background: #f4fbf8;
  box-shadow: 0 4px 12px rgba(124, 199, 180, 0.18);
}

.action-card .action-title { font-size: 12px; font-weight: 600; }
.action-card .action-subtitle { font-size: 11px; color: var(--muted); }

.shift-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.summary-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.summary-row:last-child {
  border-bottom: none;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .schedule-layout {
    grid-template-columns: 1fr;
  }
  .week-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .shift-types-layout {
    grid-template-columns: 1fr;
  }
  .shift-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  html,
  body {
    overflow: auto;
  }
  .layout { flex-direction: column; }
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    overflow: visible;
  }
  .main { margin-left: 0; }
  .topbar {
    position: sticky;
    left: 0;
    top: 0;
  }
  .content {
    margin-top: 0;
    height: auto;
    overflow: visible;
    padding: 16px;
  }
  .week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
