/* KOC - Dark Theme Styles */

:root {
  --bg-primary: #0d0d0d;
  --bg-secondary: #1a1a1a;
  --bg-card: #262626;
  --accent-gold: #d4af37;
  --accent-gold-hover: #c9a82c;
  --accent-green: #4ecca3;
  --accent-green-hover: #3dbb94;
  --accent-red: #e94560;
  --accent-red-hover: #d63851;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --border-color: #3a3a3a;
  --input-bg: #1e1e1e;
  --sidebar-width: 250px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
}

/* Login Screen */
.screen {
  display: none;
  height: 100vh;
}

.screen.active {
  display: flex;
}

#login-screen {
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 50%, #262626 100%);
}

.login-container {
  background: var(--bg-card);
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(212, 175, 55, 0.1);
  width: 400px;
  min-height: 150px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  margin-top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo {
  text-align: center;
  margin-bottom: 30px;
}

.logo img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  margin: 0 auto 25px auto;
  display: block;
  filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.4));
}

.logo h1 {
  font-size: 36px;
  color: var(--accent-gold);
  margin-bottom: 5px;
  font-weight: 700;
  letter-spacing: 3px;
}

.logo p {
  color: var(--text-secondary);
  font-size: 14px;
  letter-spacing: 1px;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.form-group input::placeholder {
  color: #555;
}

/* Remember me checkbox */
.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  cursor: pointer;
  user-select: none;
}

.remember-me input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-gold);
  cursor: pointer;
}

.remember-me span {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Logout confirm modal */
.logout-confirm-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.logout-confirm-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 30px;
  min-width: 350px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.logout-confirm-box h3 {
  color: var(--text-primary);
  margin-bottom: 10px;
  font-size: 18px;
}

.logout-confirm-box p {
  color: var(--text-secondary);
  margin-bottom: 25px;
  font-size: 14px;
}

.logout-confirm-box .btn-group {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.logout-confirm-box .btn {
  padding: 10px 28px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.logout-confirm-box .btn-cancel {
  background: var(--input-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.logout-confirm-box .btn-cancel:hover {
  background: var(--border-color);
}

.logout-confirm-box .btn-confirm-logout {
  background: #e94560;
  color: white;
}

.logout-confirm-box .btn-confirm-logout:hover {
  background: #d63851;
}

/* Hidden salary column */
.req-salary-chart {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.req-salary-chart canvas {
  width: 100%;
  height: 140px;
}

/* Request detail - fund impact cards */
.req-fund-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.req-fund-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

.req-fund-card .fund-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.req-fund-card .fund-value {
  font-size: 16px;
  font-weight: 700;
}

/* Request detail card sections */
.req-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.req-section:last-child {
  border-bottom: none;
}

.req-section h3 {
  font-size: 13px;
  color: var(--accent-gold);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.req-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.req-change-arrow {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.req-change-arrow .old-value {
  color: var(--text-secondary);
  text-decoration: line-through;
}

.req-change-arrow .arrow {
  color: var(--accent-gold);
  font-size: 20px;
}

.req-change-arrow .new-value {
  color: #4ecca3;
  font-weight: 700;
  font-size: 18px;
}

.req-timeline {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 8px 0;
}

.req-timeline .step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.req-timeline .step::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border-color);
  z-index: 0;
}

.req-timeline .step:last-child::after {
  display: none;
}

.req-timeline .step .step-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 1;
  border: 2px solid var(--border-color);
  background: var(--bg-card);
}

.req-timeline .step.completed .step-icon {
  background: #4ecca3;
  border-color: #4ecca3;
  color: #fff;
}

.req-timeline .step.current .step-icon {
  background: #d4af37;
  border-color: #d4af37;
  color: #fff;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(212, 175, 55, 0); }
}

.req-timeline .step.waiting .step-icon {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.req-timeline .step .step-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
  text-align: center;
}

.req-timeline .step.completed .step-label {
  color: #4ecca3;
}

.req-timeline .step.current .step-label {
  color: #d4af37;
  font-weight: 600;
}

.req-history-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
}

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

.req-history-item .hist-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.req-history-item.approved .hist-icon {
  background: rgba(212, 175, 55, 0.2);
  color: #4ecca3;
}

.req-history-item.rejected .hist-icon {
  background: rgba(233, 69, 96, 0.2);
  color: #e94560;
}

.req-history-item.pending .hist-icon {
  background: rgba(212, 175, 55, 0.2);
  color: #d4af37;
}

.req-doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-radius: 8px;
  margin-bottom: 8px;
}

.req-employee-history-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 12px;
}

.req-employee-history-tabs button {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.req-employee-history-tabs button:hover {
  color: var(--text-primary);
}

.req-employee-history-tabs button.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}

/* Hidden salary column */
.salary-col-hidden {
  display: none !important;
}

/* Document tabs */
.doc-tab {
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.doc-tab:hover {
  color: var(--text-primary);
  background: rgba(212, 175, 55, 0.05);
}

.doc-tab.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}

/* Document category cards */
.doc-category-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.doc-category-card:hover {
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.08);
  transform: translateY(-2px);
}

.doc-cat-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.doc-cat-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.doc-cat-count {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-gold);
}

/* Doc file list items */
.doc-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.15s;
}

.doc-file-item:hover {
  border-color: var(--accent-gold);
}

.doc-file-item .doc-file-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-file-item .doc-file-icon {
  font-size: 24px;
}

.doc-file-item .doc-file-name {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.doc-file-item .doc-file-date {
  font-size: 12px;
  color: var(--text-secondary);
}

.doc-file-item .doc-file-actions {
  display: flex;
  gap: 6px;
}

/* Date input - hide native calendar picker */
input[type="date"] {
  color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  display: none !important;
  -webkit-appearance: none;
}

input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-clear-button {
  display: none !important;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row .form-group {
  flex: 1;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #c9a82c 100%);
  color: #0d0d0d;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #e5c044 0%, var(--accent-gold) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.btn-success {
  background: #28a745;
  color: white;
}

.btn-success:hover {
  background: #218838;
}

.btn-danger {
  background: var(--accent-red);
  color: white;
}

.btn-danger:hover {
  background: var(--accent-red-hover);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
  border-color: var(--accent-gold);
}

.btn-warning {
  background: linear-gradient(135deg, #ffc107 0%, #e6ac00 100%);
  color: #0d0d0d;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #ffcd33 0%, #ffc107 100%);
}

.btn-secondary:hover {
  background: var(--border-color);
}

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

.btn-full {
  width: 100%;
}

/* Error message */
.error-message {
  color: var(--accent-red);
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
}

/* App Layout */
#app-screen {
  display: flex;
  height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto 20px auto;
  display: block;
}

.sidebar-header h2 {
  color: var(--accent-gold);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 2px;
}

.sidebar-header span {
  color: var(--text-secondary);
  font-size: 12px;
  display: block;
  margin-top: 5px;
}

.nav-menu {
  list-style: none;
  padding: 10px 0;
  flex: 1;
}

.nav-item {
  padding: 15px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(212, 175, 55, 0.1);
  transform: translateX(5px);
}

.nav-item:hover .icon {
  transform: scale(1.1);
}

.nav-item:hover .nav-text {
  transform: translateX(3px);
}

.nav-item.active {
  background: rgba(212, 175, 55, 0.15);
  border-left-color: var(--accent-gold);
}

.nav-item .icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-item .icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 30px;
  overflow-y: auto;
  height: 100vh;
  position: relative;
}

/* Pages */
.page {
  display: none;
}

.page.active {
  display: block;
  overflow: visible;
}

.page h1 {
  margin-bottom: 30px;
  color: var(--text-primary);
  font-size: 28px;
}

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

.page-header h1 {
  margin-bottom: 0;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--bg-card);
  padding: 25px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.3s;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-card-danger .stat-icon svg { fill: var(--accent-red); }
.stat-card-danger .stat-info p { color: var(--accent-red); }
.stat-card-warning .stat-icon svg { fill: #f39c12; }
.stat-card-warning .stat-info p { color: #f39c12; }
.stat-card-info .stat-icon svg { fill: #3498db; }
.stat-card-info .stat-info p { color: #3498db; }

.stat-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg {
  fill: var(--accent-gold);
}

.stat-info h3 {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 5px;
}

.stat-info p {
  font-size: 32px;
  font-weight: bold;
  color: var(--accent-gold);
}

/* Dashboard Charts */
.dashboard-charts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.chart-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
}

.chart-card h3 {
  color: var(--text-primary);
  font-size: 16px;
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

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

.bar-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bar-label {
  min-width: 140px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-track {
  flex: 1;
  height: 24px;
  background: var(--input-bg);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
  min-width: 2px;
}

.bar-fill-green { background: var(--accent-gold); }
.bar-fill-red { background: var(--accent-red); }
.bar-fill-gold { background: var(--accent-gold); }
.bar-fill-blue { background: #3498db; }
.bar-fill-orange { background: #f39c12; }
.bar-fill-purple { background: #9b59b6; }

.bar-value {
  min-width: 80px;
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
}

.bar-value-salary {
  min-width: 120px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Tables */
.table-container {
  background: var(--bg-card);
  border-radius: 12px;
  overflow-x: hidden;
}

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

th {
  background: var(--bg-secondary);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--accent-gold);
  font-size: 13px;
  border-bottom: 2px solid var(--accent-gold);
}

th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 25px;
}

th.sortable:hover {
  background: rgba(212, 175, 55, 0.15);
}

th.sortable::after {
  content: '↕';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
  font-size: 12px;
}

th.sortable.asc::after {
  content: '↑';
  opacity: 1;
}

th.sortable.desc::after {
  content: '↓';
  opacity: 1;
}

td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
}

tr:hover {
  background: rgba(212, 175, 55, 0.05);
}

/* Employee table - table layout fixed for alignment */
#employees-table {
  table-layout: fixed;
  width: 100%;
}

#employees-table th:nth-child(6),
#employees-table td:nth-child(6) {
  min-width: 120px;
}

.status-active {
  color: #4CAF50;
  font-weight: 600;
}

.status-inactive {
  color: var(--accent-gold);
  font-weight: 600;
}

.status-expired {
  color: var(--accent-red);
  font-weight: 600;
}

.status-fired {
  color: var(--accent-red);
  font-weight: 600;
}

.status-red {
  color: var(--accent-red);
  font-weight: bold;
}

/* Search and Filters */
.search-box {
  display: flex;
  gap: 15px;
}

.search-box input,
.search-box select {
  padding: 10px 15px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
}

.search-box input:focus,
.search-box select:focus {
  outline: none;
  border-color: var(--accent-gold);
}

/* Timesheet Controls */
.timesheet-controls {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.timesheet-controls select,
.timesheet-controls input {
  padding: 10px 15px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
}

/* Summary Card */
.summary-card {
  background: var(--bg-card);
  padding: 25px;
  border-radius: 12px;
  margin-top: 20px;
}

.summary-card h3 {
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.summary-item {
  text-align: center;
}

.summary-item .value {
  font-size: 28px;
  font-weight: bold;
  color: var(--accent-gold);
}

.summary-item .label {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 5px;
}

/* Violations Grid */
.violations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.violation-card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s;
}

.violation-card:hover {
  transform: translateY(-5px);
}

.violation-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.violation-info {
  padding: 20px;
}

.violation-info h3 {
  margin-bottom: 10px;
  color: var(--text-primary);
}

.violation-info p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 5px;
}

.violation-type {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 10px;
}

.type-late {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.type-uniform {
  background: rgba(23, 162, 184, 0.2);
  color: #17a2b8;
}

.type-safety {
  background: rgba(233, 69, 96, 0.2);
  color: var(--accent-red);
}

.type-other {
  background: rgba(108, 117, 125, 0.2);
  color: #6c757d;
}

/* Reports */
.reports-controls {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.reports-controls select,
.reports-controls input {
  padding: 10px 15px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
}

.report-content-old {
  background: var(--bg-card);
  padding: 30px;
  border-radius: 12px;
}

.report-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--accent-gold);
}

.report-header h2 {
  color: var(--accent-gold);
  margin-bottom: 10px;
}

.report-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.report-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.report-item .label {
  color: var(--text-secondary);
}

.report-item .value {
  font-weight: 600;
}

/* Red List */
#red-list-table tr {
  background: rgba(233, 69, 96, 0.05);
}

#red-list-table tr:hover {
  background: rgba(233, 69, 96, 0.1);
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: var(--bg-card);
  border-radius: 12px;
  width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
}

.modal-lg {
  width: 700px;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  color: var(--text-primary);
}

.close {
  font-size: 28px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.close:hover {
  color: var(--accent-red);
}

.modal-content form {
  padding: 20px;
}

.modal-actions {
  padding: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border-color);
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.checkbox-group label {
  margin: 0;
  cursor: pointer;
}

/* Employee Details */
#employee-details {
  padding: 20px;
}

.detail-row {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.detail-label {
  width: 150px;
  color: var(--text-secondary);
}

.detail-value {
  flex: 1;
  font-weight: 500;
}

/* Utility */
.hidden {
  display: none !important;
}

/* Citizenship wrapper */
.citizenship-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.citizenship-wrapper select,
.citizenship-wrapper input {
  flex: 1;
}

.citizenship-wrapper .btn {
  flex-shrink: 0;
  padding: 8px 12px;
}

/* Salary currency toggle */
.salary-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.salary-input-wrapper input {
  flex: 1;
  min-width: 200px;
}

.currency-toggle {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.currency-btn {
  padding: 10px 14px;
  background: var(--input-bg);
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.currency-btn:first-child {
  border-right: 1px solid var(--border-color);
}

.currency-btn:hover {
  background: var(--bg-card);
}

.currency-btn.active {
  background: var(--accent-gold);
  color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

/* Responsive */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* Action buttons in tables */
.action-buttons {
  display: flex;
  gap: 8px;
}

.action-buttons .btn-small svg,
.archive-actions .btn-small svg,
.search-result-add svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  vertical-align: middle;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 15px 25px;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  z-index: 2000;
  animation: toastSlideIn 0.3s ease, toastSlideOut 0.3s ease 2.7s;
}

.toast-success {
  background: var(--accent-gold);
}

.toast-error {
  background: var(--accent-red);
}

.toast-warning {
  background: #ffc107;
  color: #1a1a2e;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Import styles */
.import-content {
  padding: 20px;
}

.import-instructions {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.import-instructions h3 {
  color: var(--accent-gold);
  margin-bottom: 10px;
}

.import-instructions code {
  display: block;
  background: var(--bg-primary);
  padding: 10px;
  border-radius: 4px;
  margin: 10px 0;
  font-family: monospace;
  color: var(--accent-gold);
  overflow-x: auto;
}

.import-instructions p {
  color: var(--text-secondary);
  margin-bottom: 10px;
}

/* Progress bar */
.progress-bar {
  background: var(--bg-primary);
  border-radius: 8px;
  height: 24px;
  margin: 10px 0;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, var(--accent-gold), #e6ac00);
  height: 100%;
  width: 0%;
  transition: width 0.3s;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: var(--bg-primary);
}

/* Search box with buttons */
.search-box {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.search-box input[type="text"] {
  min-width: 200px;
}

/* Action buttons in employee details */
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 20px;
  border-top: 1px solid var(--border-color);
}

.modal-actions .btn {
  min-width: 120px;
}

/* Archive styles */
.archive-notice {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 20px;
}

.archive-notice p {
  color: #ffc107;
  margin: 0;
}

.archive-actions {
  display: flex;
  gap: 5px;
}

.archive-actions .btn {
  padding: 4px 8px;
  font-size: 12px;
}

.status-archived {
  color: #ffc107;
  font-weight: bold;
}

/* Timesheet styles */
.timesheet-controls {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.date-picker-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-picker-group label {
  color: var(--text-secondary);
  font-weight: 600;
}

.timesheet-add-employee {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.timesheet-add-employee h3 {
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-size: 14px;
}

.add-employee-row {
  display: flex;
  gap: 15px;
  align-items: center;
}

.add-employee-row select {
  flex: 1;
  padding: 10px 15px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
}

.timesheet-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  text-align: center;
}

.timesheet-input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.timesheet-select {
  width: 100%;
  padding: 8px 12px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
}

.timesheet-select:focus {
  outline: none;
  border-color: var(--accent-gold);
}

#timesheet-table td {
  padding: 8px;
}

#timesheet-table th {
  text-align: center;
}

/* Missing employees styles */
.missing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.missing-header h3 {
  color: #ffc107;
  margin: 0;
}

.missing-list {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 15px;
  max-height: 300px;
  overflow-y: auto;
}

.missing-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid var(--border-color);
}

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

.missing-info {
  color: var(--text-primary);
  font-size: 14px;
}

.missing-info strong {
  color: var(--accent-gold);
}

.btn-warning {
  background: #ffc107;
  color: #1a1a2e;
}

.btn-warning:hover {
  background: #ffca2c;
}

/* Search employee styles */
.search-employee-wrapper {
  position: relative;
  flex: 1;
}

.search-employee-wrapper input {
  width: 100%;
  padding: 10px 15px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
}

.search-employee-wrapper input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.search-result-item {
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-result-item:hover,
.search-result-item.active {
  background: rgba(212, 175, 55, 0.1);
}

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

.search-result-info {
  display: flex;
  flex-direction: column;
}

.search-result-name {
  color: var(--text-primary);
  font-weight: 600;
}

.search-result-details {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 2px;
}

.search-result-add {
  color: var(--accent-gold);
  font-size: 18px;
}

.add-employee-row {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

/* Broadcast styles */
.broadcast-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.broadcast-form {
  background: var(--bg-card);
  padding: 25px;
  border-radius: 12px;
}

.broadcast-form textarea {
  width: 100%;
  padding: 15px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  resize: vertical;
  min-height: 150px;
}

.broadcast-form textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.broadcast-actions {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.broadcast-stats {
  background: var(--bg-card);
  padding: 25px;
  border-radius: 12px;
}

.broadcast-stats h3 {
  color: var(--accent-gold);
  margin-bottom: 20px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.stat-label {
  color: var(--text-secondary);
}

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

.broadcast-history {
  background: var(--bg-card);
  padding: 25px;
  border-radius: 12px;
}

.broadcast-history h3 {
  color: var(--accent-gold);
  margin-bottom: 20px;
}

.broadcast-item {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
}

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

.broadcast-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.broadcast-item-subject {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 16px;
}

.broadcast-item-date {
  color: var(--text-secondary);
  font-size: 12px;
}

.broadcast-item-message {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.broadcast-item-stats {
  display: flex;
  gap: 20px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Telegram users list */
.telegram-users-container {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 25px;
  margin-top: 20px;
}

.telegram-users-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.telegram-users-header h3 {
  color: var(--accent-gold);
  margin: 0;
}

.telegram-username {
  color: var(--accent-gold);
  font-weight: 600;
}

.telegram-id {
  color: var(--text-secondary);
  font-family: monospace;
  font-size: 12px;
}

/* Reports */
.report-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.report-tab {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.report-tab:hover {
  background: var(--input-bg);
  color: var(--text-primary);
}

.report-tab.active {
  background: #D4A017;
  color: #fff;
  border-color: #D4A017;
}

.report-content {
  display: none;
}

.report-content.active {
  display: block;
}

.report-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.report-detail-header h3 {
  color: var(--accent-gold);
  margin: 0;
}

.report-info-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.report-info-card .info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.report-info-card .info-row:last-child {
  border-bottom: none;
}

.report-info-card .info-label {
  color: var(--text-secondary);
}

.report-info-card .info-value {
  color: var(--text-primary);
  font-weight: 600;
}

.report-salary-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--accent-gold);
}

.report-salary-card h3 {
  color: var(--accent-gold);
  margin: 0 0 15px 0;
}

.report-salary-card .salary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.report-salary-card .salary-row:last-child {
  border-bottom: none;
  font-size: 18px;
  font-weight: bold;
  color: var(--accent-gold);
}

.report-salary-card .salary-label {
  color: var(--text-secondary);
}

.report-salary-card .salary-value {
  color: var(--text-primary);
  font-weight: 600;
}

/* Salary calculation tree */
.salary-tree {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 8px 0;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
}

.salary-tree .salary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: none;
}

.salary-tree .salary-row .salary-label {
  color: var(--text-secondary);
  white-space: pre;
  font-size: 13px;
}

.salary-tree .salary-row .salary-value {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13px;
  text-align: right;
}

.salary-tree .salary-row:last-child {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.salary-tree .salary-row:last-child .salary-label {
  font-size: 15px;
  font-weight: bold;
  color: var(--text-primary);
}

.salary-tree .salary-row:last-child .salary-value {
  font-size: 16px;
  font-weight: bold;
}

/* Settings */
.settings-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.settings-tab {
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s;
}

.settings-tab:hover {
  background: var(--input-bg);
}

.settings-tab.active {
  background: var(--accent-gold);
  color: #1a1a2e;
  border-color: var(--accent-gold);
}

.settings-content {
  display: none;
}

.settings-content.active {
  display: block;
}

.settings-toolbar {
  margin-bottom: 20px;
}

/* Readonly inputs */
input[readonly][disabled] {
  background: var(--input-bg);
  opacity: 0.7;
  cursor: not-allowed;
}

/* Rest days grid */
.rest-days-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rest-day-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--accent-red);
  color: white;
  border-radius: 16px;
  font-size: 13px;
}

.rest-day-chip .remove-rest-day {
  cursor: pointer;
  opacity: 0.7;
  font-size: 14px;
}

.rest-day-chip .remove-rest-day:hover {
  opacity: 1;
}

.rest-days-content {
  padding: 20px;
}

/* Vacation search results */
.search-results {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
  width: 100%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.search-result-item:hover {
  background: var(--bg-secondary);
}

/* Vacation status badges */
.status-upcoming {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(33, 150, 243, 0.15);
  color: #2196F3;
}

.status-completed {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(158, 158, 158, 0.15);
  color: #9E9E9E;
}

/* Employee modal tabs */
.report-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0;
}

.report-tab {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.report-tab:hover {
  background: var(--input-bg);
  color: var(--text-primary);
}

.report-tab.active {
  background: #D4A017;
  color: #fff;
  border-color: #D4A017;
}

.emp-tab-content {
  display: none;
  max-height: 60vh;
  overflow-y: auto;
}

.emp-tab-content.active {
  display: block;
}

/* Passport/Visa/License cards */
.document-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
}

.document-card .doc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.document-card .doc-header h4 {
  margin: 0;
  color: var(--accent-gold);
}

.document-card .doc-actions {
  display: flex;
  gap: 5px;
}

.document-card .doc-field {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
}

.document-card .doc-field .label {
  color: var(--text-secondary);
}

.document-card .doc-field .value {
  color: var(--text-primary);
  font-weight: 500;
}

.status-active {
  color: #4CAF50;
}

.status-expired {
  color: var(--accent-red);
}

.status-warning {
  color: var(--accent-gold);
}

/* Employee card page - no scroll */
#page-employee-card.page.active {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

/* Pages that need internal scroll */
#page-employees.page.active,
#page-employee-list.page.active,
#page-timesheet.page.active,
#page-violations.page.active,
#page-vacation.page.active,
#page-reports.page.active,
#page-red-list.page.active,
#page-archive.page.active,
#page-broadcast.page.active,
#page-approvals.page.active,
#page-audit.page.active,
#page-settings.page.active {
  overflow-y: auto;
}

/* Hire page & Reports page - overflow visible for dropdowns */
#page-hire-employee.page.active,
#page-reports.page.active {
  overflow: visible;
}

/* Card compact rows */
.compact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.compact-row label {
  min-width: 90px;
  font-size: 13px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* Card edit fields */
.card-edit-field {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-primary);
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 13px;
  width: 240px;
  transition: all 0.2s;
}

.card-edit-field.wide {
  width: 350px;
}

.card-edit-field:hover {
  border-color: var(--border-color);
}

.card-edit-field:focus {
  border-color: var(--accent-gold);
  background: var(--input-bg);
  outline: none;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* All text inputs: no uppercase (allow Uzbek/Karakalpak Cyrillic) */
#login-screen input[type="text"],
#login-screen input[type="password"],
#broadcast-subject,
#broadcast-message {
  text-transform: none;
}

input[type="text"]::placeholder,
input[type="search"]::placeholder,
textarea::placeholder {
  text-transform: none;
}

/* Autocomplete dropdown */
.autocomplete-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.autocomplete-wrapper input {
  flex: 1;
  padding-right: 35px;
}

.autocomplete-wrapper .autocomplete-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
  display: none;
  z-index: 10;
}

.autocomplete-wrapper .autocomplete-clear:hover {
  color: var(--accent-red);
}

.autocomplete-wrapper.has-value .autocomplete-clear {
  display: block;
}

.autocomplete-wrapper input.invalid {
  border-color: var(--accent-red);
  box-shadow: 0 0 0 2px rgba(233, 69, 96, 0.2);
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 200px;
  overflow-y: auto;
}

.autocomplete-dropdown .autocomplete-item {
  padding: 10px 15px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 14px;
}

.autocomplete-dropdown .autocomplete-item:hover,
.autocomplete-dropdown .autocomplete-item.active {
  background: var(--bg-secondary);
  color: var(--accent-gold);
}

/* ==================== UI IMPROVEMENTS ==================== */

/* Hover effects for buttons */
.btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.btn:active::after {
  width: 200px;
  height: 200px;
}

/* Hover effects for navigation */


/* Hover effects for stat cards */
.stat-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--accent-gold);
}

/* Hover effects for table rows */
table tbody tr {
  transition: all 0.15s ease;
}

table tbody tr:hover {
  background: rgba(212, 175, 55, 0.08);
  transform: scale(1.002);
}

/* Hover effects for form inputs */
input, select, textarea {
  transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
  outline: none;
}

input:hover, select:hover, textarea:hover {
  border-color: var(--accent-gold-hover);
}

/* Smooth modal animations */
.modal {
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-content {
  animation: modalFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 16px;
  overflow: hidden;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Loader/Spinner */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.loader-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loader {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(212, 175, 55, 0.2);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader-small {
  width: 24px;
  height: 24px;
  border-width: 3px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toast improvements */
.toast {
  animation: toastSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
             toastSlideOut 0.3s ease 2.7s;
  border-radius: 12px;
  padding: 14px 20px;
  font-weight: 500;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
}

.toast::before {
  font-size: 18px;
}

.toast-success::before { content: '✅'; }
.toast-error::before { content: '❌'; }
.toast-warning::before { content: '⚠️'; }
.toast-info::before { content: 'ℹ️'; }

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(100%) scale(0.9);
  }
}

/* Micro-animations for page transitions */
.page {
  animation: pageFadeIn 0.2s ease;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Smooth checkbox/radio animations */
input[type="checkbox"], input[type="radio"] {
  transition: all 0.2s ease;
  cursor: pointer;
}

input[type="checkbox"]:hover, input[type="radio"]:hover {
  transform: scale(1.1);
}

/* Card hover effects */
.card, .form-card, .info-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover, .form-card:hover, .info-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* Tab hover effects */
.tab-btn, .doc-tab, .req-employee-history-tabs button {
  transition: all 0.2s ease;
  position: relative;
}

.tab-btn:hover, .doc-tab:hover {
  background: rgba(212, 175, 55, 0.1);
}

.tab-btn::after, .doc-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  transition: all 0.2s ease;
  transform: translateX(-50%);
}

.tab-btn:hover::after, .doc-tab:hover::after {
  width: 60%;
}

/* Search results animation */
.search-results {
  animation: dropdownSlide 0.2s ease;
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Smooth badge animation */




/* Button loading state */
.btn.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  transform: translate(-50%, -50%);
}

/* Smooth scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--accent-gold);
  border-radius: 4px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold-hover);
}

/* Focus visible for accessibility */
.btn:focus-visible, .nav-item:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

/* Modal fade out animation */
@keyframes modalFadeOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
}

/* Smooth hover for search results */
.search-result-item {
  transition: all 0.15s ease;
  border-radius: 6px;
  cursor: pointer;
}

.search-result-item:hover {
  background: rgba(212, 175, 55, 0.1);
  padding-left: 12px;
}

.search-result-item.active {
  background: rgba(212, 175, 55, 0.15);
  border-left: 3px solid var(--accent-gold);
}

/* Pulse animation for badges with notifications */


@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Smooth dropdown animations */
.dropdown-menu, .search-results {
  animation: dropdownSlide 0.2s ease;
  border-radius: 8px;
  overflow: hidden;
}

/* Loading skeleton effect */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.1) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s infinite;
  border-radius: 4px;
  height: 20px;
  margin-bottom: 8px;
}

@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Gold border on hover for hub cards */
.stat-card#hub-employee-list,
.stat-card#hub-employee-card,
.stat-card#hub-hire-employee,
.stat-card#hub-fire-employee,
.stat-card#hub-transfer-employee,
.stat-card#hub-zimmet-page {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  border-radius: 12px;
}

.stat-card#hub-employee-list:hover,
.stat-card#hub-employee-card:hover,
.stat-card#hub-hire-employee:hover,
.stat-card#hub-fire-employee:hover,
.stat-card#hub-transfer-employee:hover,
.stat-card#hub-zimmet-page:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.25);
  transform: translateY(-3px);
}

/* Gold border for all stat-cards in hub */
.page-hub .stat-card:hover,
[id^="hub-"].stat-card:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.25);
}

/* Visa department hub card gold border */
.stat-card#hub-visa-department {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  border-radius: 12px;
}

.stat-card#hub-visa-department:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.25);
  transform: translateY(-3px);
}

/* ==================== ZEBRA ROWS ==================== */
table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

table tbody tr:nth-child(odd) {
  background: transparent;
}

table tbody tr:hover {
  background: rgba(212, 175, 55, 0.08) !important;
}

/* ==================== STICKY HEADER ==================== */
.table-container {
  overflow-x: hidden;
}

.table-container thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}



.table-container thead th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gold);
  opacity: 0.5;
}

/* ==================== SOFT SHADOWS ==================== */
.stat-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.form-card, .info-card, .card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-card:hover, .info-card:hover, .card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.modal-content {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}

.search-box input, .search-box select {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-box input:focus, .search-box select:focus {
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

/* Table container shadow */
.table-container {
  border-radius: 12px;
  overflow-x: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Button shadows */
.btn {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover, .btn-success:hover {
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-danger:hover {
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}


/* ==================== NAV BADGES ==================== */
.nav-badge {
  display: none;
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #e94560 0%, #c73e54 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 8px rgba(233, 69, 96, 0.4);
  animation: badgePulse 2s infinite;
  transition: all 0.2s ease;
  z-index: 5;
}

.nav-badge:hover {
  transform: translateY(-50%) scale(1.15);
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.5);
}

.nav-item {
  position: relative;
}

@keyframes badgePulse {
  0%, 100% { 
    transform: translateY(-50%) scale(1);
    box-shadow: 0 2px 8px rgba(233, 69, 96, 0.4);
  }
  50% { 
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.5);
  }
}


/* ==================== DASHBOARD STAT CARD HOVER COLORS ==================== */
.stat-card.stat-hover-green:hover {
  border-color: #4ecca3 !important;
  box-shadow: 0 8px 25px rgba(78, 204, 163, 0.3);
  transform: translateY(-3px);
}

.stat-card.stat-hover-blue:hover {
  border-color: #2196F3 !important;
  box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3);
  transform: translateY(-3px);
}

.stat-card.stat-hover-red:hover {
  border-color: #e94560 !important;
  box-shadow: 0 8px 25px rgba(233, 69, 96, 0.3);
  transform: translateY(-3px);
}

.stat-card.stat-hover-gold:hover {
  border-color: #d4af37 !important;
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
  transform: translateY(-3px);
}

.stat-card.stat-hover-orange:hover {
  border-color: #FF9800 !important;
  box-shadow: 0 8px 25px rgba(255, 152, 0, 0.3);
  transform: translateY(-3px);
}

.stat-card.stat-hover-purple:hover {
  border-color: #9C27B0 !important;
  box-shadow: 0 8px 25px rgba(156, 39, 176, 0.3);
  transform: translateY(-3px);
}

/* ==================== FILTER BUTTONS BOUNCE ==================== */
.filter-buttons-container .btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.filter-buttons-container .btn:active {
  animation: bounceClick 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceClick {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(0.92);
  }
  50% {
    transform: scale(1.08);
  }
  70% {
    transform: scale(0.97);
  }
  100% {
    transform: scale(1);
  }
}

/* Selected button bounce on filter change */
.filter-buttons-container .btn.selected {
  animation: selectedBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes selectedBounce {
  0% {
    transform: scale(1);
  }
  20% {
    transform: scale(1.15);
  }
  40% {
    transform: scale(0.95);
  }
  60% {
    transform: scale(1.05);
  }
  80% {
    transform: scale(0.98);
  }
  100% {
    transform: scale(1);
  }
}

/* Ripple effect on click */
.filter-buttons-container .btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.filter-buttons-container .btn:active::before {
  width: 200px;
  height: 200px;
}

/* Glow effect on selected */
.filter-buttons-container .btn.selected-green {
  background: rgba(76, 175, 80, 0.3) !important;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.filter-buttons-container .btn.selected-red {
  background: rgba(233, 69, 96, 0.3) !important;
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.filter-buttons-container .btn.selected-gold {
  background: rgba(212, 175, 55, 0.3) !important;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

/* ==================== HUB BUTTONS UNIFORM SIZE ==================== */
[id^="hub-"] {
  min-height: 40px !important;
  min-width: 160px !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 8px !important;
  box-sizing: border-box;
}

[id^="hub-"] .stat-icon {
  margin-bottom: 8px;
  min-height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
}

[id^="hub-"] .stat-info h3 {
  margin: 0 0 5px 0;
  min-height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

[id^="hub-"] .stat-info p {
  margin: 0;
  min-height: 14px;
}

/* Make buttons grid layout */
#page-employees .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

#page-employees .stats-grid .stat-card {
  width: 100%;
}

/* Fix horizontal scrollbars on dashboard violations/deductions */
#dashboard-violations-stats,
#dashboard-deductions-stats {
  overflow: hidden;
  flex-wrap: wrap;
}

#dashboard-violations-months,
#dashboard-deductions-detail {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 400px;
}

#dashboard-violations-months::-webkit-scrollbar,
#dashboard-deductions-detail::-webkit-scrollbar {
  width: 4px;
}

#dashboard-violations-months::-webkit-scrollbar-thumb,
#dashboard-deductions-detail::-webkit-scrollbar-thumb {
  background: var(--accent-gold);
  border-radius: 2px;
}

/* Fix any table inside dashboard stats */
#dashboard-violations-months table,
#dashboard-deductions-detail table {
  width: 100%;
  table-layout: fixed;
}

#dashboard-violations-months th,
#dashboard-violations-months td,
#dashboard-deductions-detail th,
#dashboard-deductions-detail td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==================== EMPLOYEE TABLE COLUMN WIDTHS ==================== */
#employees-table {
  table-layout: fixed;
  width: 100%;
}

#employees-table th:nth-child(1),
#employees-table td:nth-child(1) {
  width: 10% !important;
}

#employees-table th:nth-child(2),
#employees-table td:nth-child(2) {
  width: 35% !important;
}

#employees-table th:nth-child(3),
#employees-table td:nth-child(3) {
  width: 30% !important;
}

#employees-table th:nth-child(4),
#employees-table td:nth-child(4) {
  width: 10% !important;
}

#employees-table th:nth-child(5),
#employees-table td:nth-child(5) {
  width: 8% !important;
}

#employees-table th:nth-child(6),
#employees-table td:nth-child(6) {
  width: 10% !important;
}

#employees-table th:nth-child(7),
#employees-table td:nth-child(7) {
  width: 0 !important;
  display: none !important;
}

#employees-table th:nth-child(8),
#employees-table td:nth-child(8) {
  width: 10% !important;
}

#employees-table th:nth-child(9),
#employees-table td:nth-child(9) {
  width: 10% !important;
}

#employees-table th:nth-child(10),
#employees-table td:nth-child(10) {
  width: 10% !important;
}

#employees-table th:nth-child(11),
#employees-table td:nth-child(11) {
  width: 0 !important;
  display: none !important;
}

/* Hide actions column */
.actions-col {
  display: none !important;
}

/* Hide salary column when no permission */
.salary-col-hidden {
  display: none !important;
}
