:root {
  --shk-brown: #AF8B5C;
  --shk-brown-dark: #8B6F47;
  --shk-brown-darker: #644B2D;
  --shk-gray: #7A7A7A;
  --shk-gray-light: #989796;
  --shk-gold: #C9A227;
  --shk-gold-light: #E8D296;
  --shk-bg: #F5F3F0;
  --shk-white: #FFFFFF;
}

body {
  background: var(--shk-bg);
  color: var(--shk-gray);
  padding-top: 0;
  font-family: "Segoe UI", Arial, sans-serif;
}

.page-wrap { padding: 70px 15px 30px; }

.topbar {
  background: var(--shk-white);
  border-bottom: 2px solid var(--shk-brown);
  box-shadow: 0 1px 4px rgba(100, 75, 45, 0.08);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--shk-brown) !important;
  font-weight: 700;
  padding-top: 10px;
  padding-bottom: 10px;
}

.navbar-brand img {
  height: 36px;
  width: auto;
}

.nav > li > a { color: var(--shk-gray); }

.nav > li.active > a,
.nav > li > a:hover,
.nav > li > a:focus {
  color: var(--shk-brown) !important;
  background: transparent !important;
}

.panel {
  box-shadow: 0 0 4px rgba(100, 75, 45, 0.12);
  border: none;
  border-top: 3px solid var(--shk-brown);
}

.panel-heading {
  background: var(--shk-white);
  border-bottom: 1px solid #e8e4df;
  color: var(--shk-brown-dark);
}

.btn-primary {
  background: var(--shk-brown);
  border-color: var(--shk-brown-dark);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
  background: var(--shk-brown-dark);
  border-color: var(--shk-brown-darker);
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--shk-brown) 0%, var(--shk-brown-dark) 55%, var(--shk-brown-darker) 100%);
}

.login-box {
  background: var(--shk-white);
  padding: 40px;
  border-radius: 8px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 24px rgba(100, 75, 45, 0.25);
  text-align: center;
}

.login-box .login-logo {
  max-width: 280px;
  width: 100%;
  height: auto;
  margin: 0 auto 20px;
  display: block;
}

.login-box h1 {
  color: var(--shk-brown-dark);
  margin-top: 0;
  font-size: 22px;
  font-weight: 600;
}

.login-box .text-muted { color: var(--shk-gray) !important; }

.login-options {
  margin-bottom: 15px;
  font-size: 13px;
}

.login-remember {
  margin: 0;
  font-weight: 400;
  color: var(--shk-gray);
}

.login-forgot {
  float: right;
  font-size: 13px;
}

.login-back-link {
  margin-top: 18px;
  font-size: 13px;
}

.schedule-tabs {
  background: var(--shk-bg);
  padding: 10px 15px 0;
  margin-bottom: 0;
}

.schedule-tabs .nav-tabs > li.active > a,
.schedule-tabs .nav-tabs > li.active > a:hover,
.schedule-tabs .nav-tabs > li.active > a:focus {
  color: var(--shk-brown);
  border-top: 2px solid var(--shk-brown);
}

.schedule-table td {
  vertical-align: top;
  min-width: 110px;
  font-size: 12px;
}

.schedule-table .report-col-head,
.schedule-table .report-col {
  min-width: 200px;
  width: 200px;
  background: #faf8f5;
  vertical-align: top;
}

.hours-report-title {
  font-weight: 700;
  color: var(--shk-brown-dark);
  margin-bottom: 4px;
  font-size: 12px;
}

.hours-report-meta {
  font-size: 10px;
  color: var(--shk-gray-light);
  margin-bottom: 8px;
  line-height: 1.4;
}

.hours-report-table {
  width: 100%;
  font-size: 11px;
  border-collapse: collapse;
}

.hours-report-table th,
.hours-report-table td {
  border: 1px solid #e8e4df;
  padding: 3px 4px;
  vertical-align: top;
  min-width: 0;
}

.hours-report-table th {
  background: var(--shk-brown);
  color: var(--shk-white);
  font-size: 10px;
  text-align: center;
}

.hours-report-table th:first-child { text-align: left; }

.hours-report-table td:nth-child(2),
.hours-report-table td:nth-child(3) {
  text-align: center;
  white-space: nowrap;
  font-weight: 600;
  color: var(--shk-brown-dark);
}

.hours-report-position {
  font-size: 9px;
  color: var(--shk-gray-light);
}

.staff-chip {
  display: block;
  margin-bottom: 4px;
  padding: 4px;
  background: #faf8f5;
  border-left: 3px solid var(--shk-gold);
  border-radius: 2px;
}

.staff-chip img,
.staff-chip .staff-avatar {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  max-width: 24px;
  max-height: 24px;
  border-radius: 50%;
  margin-right: 4px;
  object-fit: cover;
  vertical-align: middle;
  flex-shrink: 0;
}

.staff-chip small { color: var(--shk-gray-light); display: block; }

.staff-hours {
  color: var(--shk-brown-dark) !important;
  font-weight: 600;
  margin-top: 2px;
}

.custom-hours-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--shk-white);
  background: var(--shk-gold);
  border-radius: 2px;
  padding: 0 4px;
  margin-left: 4px;
  vertical-align: middle;
}

.assign-form {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #e0dbd4;
}

.assign-form select { width: 100%; margin-bottom: 4px; }

.assign-hours {
  display: grid;
  grid-template-columns: auto minmax(0, 58px);
  gap: 1px 4px;
  align-items: center;
  margin-bottom: 4px;
}

.assign-hours label {
  font-size: 9px;
  color: var(--shk-gray);
  margin: 0;
  font-weight: 600;
}

.schedule-table .assign-hours input[type="time"],
.schedule-table .hours-edit-form input[type="time"] {
  width: 100%;
  max-width: 58px;
  min-width: 0;
  height: 15px;
  padding: 0 2px;
  font-size: 10px;
  line-height: 15px;
}

.schedule-table .assign-hours input[type="time"]::-webkit-calendar-picker-indicator,
.schedule-table .hours-edit-form input[type="time"]::-webkit-calendar-picker-indicator {
  margin: 0;
  padding: 0;
  transform: scale(0.75);
}

.hours-edit-form {
  display: grid;
  grid-template-columns: 58px 58px auto;
  gap: 2px;
  margin-top: 4px;
  max-width: 132px;
}

.hours-edit-form .form-control { min-width: 0; }

.hours-edit-form .btn {
  padding: 0 4px;
  height: 15px;
  line-height: 15px;
  font-size: 10px;
}

.staff-remove-form {
  margin-top: 4px;
}

.staff-remove-btn {
  font-size: 10px;
  padding: 1px 6px;
  line-height: 1.4;
}

.week-nav { margin: 15px 0; }

.export-pdf-group { margin-left: 8px; }
.export-pdf-group .dropdown-menu > li > a { font-size: 13px; }
.export-pdf-group .dropdown-header { font-size: 11px; color: var(--shk-gray-light); }

.view-tabs { margin-top: -2px; }
.view-tabs .btn { margin-left: 4px; }

.week-nav .btn-default {
  color: var(--shk-brown);
  border-color: var(--shk-brown);
}

.week-nav .btn-default:hover {
  background: var(--shk-brown);
  color: var(--shk-white);
}

a { color: var(--shk-brown); }
a:hover, a:focus { color: var(--shk-brown-darker); }

.staff-avatar,
.staff-status-form {
  margin: 0;
}

.staff-status-select {
  border: 0;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
  appearance: auto;
}

.staff-status-select.is-active {
  background: #5cb85c;
  color: #fff;
}

.staff-status-select.is-inactive {
  background: #d9534f;
  color: #fff;
}

.staff-status-select option {
  color: #333;
  background: #fff;
}

.staff-section-row td {
  background: #faf8f5;
  color: var(--shk-gray);
  font-size: 12px;
  padding: 8px 12px !important;
  border-top: 2px solid #e8e4df;
}

.staff-row-inactive {
  opacity: 0.72;
}

.staff-table .staff-avatar,
.staff-avatar-preview {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  max-width: 44px;
  max-height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  overflow: hidden;
}

.staff-avatar-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ebe6df;
  color: var(--shk-gray-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.staff-edit-row > td {
  background: #faf8f5;
  border-top: none !important;
  padding: 20px !important;
}

.staff-edit-form .form-group { margin-bottom: 12px; }

.staff-avatar-edit {
  text-align: center;
}

.staff-avatar-edit .staff-avatar-preview,
.staff-avatar-edit .staff-avatar-placeholder {
  width: 96px;
  height: 96px;
  min-width: 96px;
  min-height: 96px;
  max-width: 96px;
  max-height: 96px;
  margin: 0 auto 10px;
  font-size: 36px;
  overflow: hidden;
}

.staff-edit-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.free-day-badge,
.free-day-marker {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
}

.free-day-pending {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.free-day-approved {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.free-day-rejected {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.free-day-marker {
  display: block;
  margin-bottom: 6px;
  text-align: center;
}

.free-day-marker small {
  display: block;
  font-weight: 400;
  opacity: 0.85;
}

.free-day-count {
  margin-left: 8px;
  vertical-align: middle;
}

.free-day-actions .inline-form,
.inline-form {
  display: inline-block;
  margin: 0 2px;
}

.free-day-add-form .form-group {
  margin-right: 12px;
  margin-bottom: 10px;
}

.free-day-add-form label {
  display: block;
  font-size: 12px;
  color: var(--shk-gray);
  margin-bottom: 2px;
}

.staff-chip-free {
  opacity: 0.55;
  border-left-color: var(--shk-gray-light);
}

.schedule-view-tabs .btn { margin-left: 4px; }

.month-table { font-size: 10px; }
.month-table .month-day-head { min-width: 28px; padding: 2px !important; }
.month-table .month-day-cell { min-width: 28px; padding: 2px !important; vertical-align: top; }
.month-table .month-weekend { background: #f0ebe3; }
.month-table .month-monday { border-left: 2px solid var(--shk-brown) !important; }
.month-table .dow-mini { font-size: 8px; color: var(--shk-gray-light); }
.month-shift-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1px;
  background: #d4edda;
  border-radius: 2px;
  font-size: 9px;
  margin-bottom: 1px;
  padding: 0 1px 0 2px;
}

.month-shift-label {
  flex: 1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-remove-form {
  margin: 0;
  flex-shrink: 0;
}

.month-remove-btn {
  border: 0;
  background: transparent;
  color: #a94442;
  font-size: 12px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}

.month-remove-btn:hover {
  color: #843534;
}
.month-add-form select { font-size: 9px; height: 18px; padding: 0; }
.month-staff-col { min-width: 120px; }
.month-absence { font-size: 9px; font-weight: 700; }

.plan-select { max-width: 56px; margin: 0 auto; text-align: center; }

.plan-shift-edit > td {
  background: #faf8f5;
  padding: 12px 15px !important;
}

.plan-shift-form label {
  margin: 0 4px 0 10px;
  font-size: 11px;
  color: var(--shk-gray);
  font-weight: 600;
}

.plan-shift-form .form-control { margin-right: 4px; }

.absence-vacation { background: #cce5ff; color: #004085; }
.absence-sick { background: #f8d7da; color: #721c24; }
.absence-unpaid { background: #e2e3e5; color: #383d41; }
.absence-free { background: #fff3cd; color: #856404; }
.absence-marker {
  display: inline-block;
  width: 18px;
  height: 18px;
  line-height: 18px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
}
.absence-add-form .form-group {
  margin-right: 12px;
  margin-bottom: 8px;
}

.absence-add-form label {
  display: block;
  font-size: 11px;
  color: var(--shk-gray);
  margin-bottom: 2px;
}

.absence-legend { margin-top: 10px; }
.absence-legend-item {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
}
.notworked-table .notworked-cell { min-width: 28px; padding: 2px !important; }

.hours-summary-card { border-top: 3px solid var(--shk-gold); }
.hours-summary-label { font-size: 12px; color: var(--shk-gray); }
.hours-summary-value { font-size: 22px; font-weight: 700; color: var(--shk-brown-dark); }
.hours-summary-row { margin-bottom: 15px; }

@media (max-width: 768px) {
  .schedule-table { font-size: 11px; }
  .page-wrap { padding-top: 60px; }
  .navbar-brand img { height: 28px; }
  .free-day-add-form .form-group { display: block; }
}