*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f766e 100%);
  color: #e2e8f0;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
}

.page:has(.card) {
  align-items: center;
}

.card {
  width: 100%;
  max-width: 420px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.card h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
}

.card p {
  margin: 0 0 24px;
  color: #94a3b8;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 1rem;
}

.form-group input:focus {
  outline: 2px solid #14b8a6;
  border-color: #14b8a6;
}

.btn {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: #14b8a6;
  color: #042f2e;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn:hover {
  background: #2dd4bf;
}

.error {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  font-size: 0.9rem;
}

.hint {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  font-size: 0.85rem;
  color: #64748b;
}

.hint code {
  color: #5eead4;
}

.dashboard {
  width: 100%;
  max-width: 1100px;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.dashboard-header h1 {
  margin: 0;
  font-size: 2rem;
}

.dashboard-header p {
  margin: 6px 0 0;
  color: #94a3b8;
}

.dashboard-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-date {
  color: #94a3b8;
  font-size: 0.9rem;
}

.dashboard-header .btn {
  width: auto;
  padding: 10px 18px;
  background: rgba(148, 163, 184, 0.15);
  color: #e2e8f0;
}

.dashboard-header .btn:hover {
  background: rgba(148, 163, 184, 0.25);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 20px;
}

.stat-label {
  margin: 0 0 8px;
  color: #94a3b8;
  font-size: 0.9rem;
}

.stat-value {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 700;
  color: #f8fafc;
}

.stat-change {
  margin: 0;
  font-size: 0.85rem;
}

.stat-change.positive {
  color: #5eead4;
}

.stat-change.negative {
  color: #fca5a5;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.panel {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}

.dashboard-grid .panel {
  margin-bottom: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.panel h2 {
  margin: 0;
  font-size: 1.2rem;
}

.panel-meta {
  color: #64748b;
  font-size: 0.85rem;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  height: 180px;
  padding-top: 8px;
}

.bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 8px;
}

.bar::before {
  content: '';
  width: 100%;
  max-width: 36px;
  height: var(--h);
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #2dd4bf 0%, #0f766e 100%);
}

.bar span {
  color: #64748b;
  font-size: 0.75rem;
}

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.activity-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.activity-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-dot {
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: #14b8a6;
  flex-shrink: 0;
}

.activity-list p {
  margin: 0 0 4px;
  color: #e2e8f0;
  font-size: 0.95rem;
}

.activity-list small {
  color: #64748b;
  font-size: 0.8rem;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.data-table th {
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
}

.data-table td {
  color: #e2e8f0;
  font-size: 0.9rem;
}

.data-table tbody tr:hover {
  background: rgba(148, 163, 184, 0.05);
}

.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-pill.success {
  background: rgba(20, 184, 166, 0.2);
  color: #5eead4;
}

.status-pill.pending {
  background: rgba(251, 191, 36, 0.15);
  color: #fcd34d;
}

.status-pill.cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-date {
    display: none;
  }
}

@media (max-width: 520px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.inactivity-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(4px);
}

.inactivity-modal {
  width: 100%;
  max-width: 420px;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.inactivity-modal h2 {
  margin: 0 0 12px;
  font-size: 1.4rem;
  color: #f8fafc;
}

.inactivity-modal p {
  margin: 0 0 12px;
  color: #94a3b8;
  line-height: 1.5;
}

.inactivity-modal-duration {
  margin-bottom: 20px !important;
  color: #cbd5e1 !important;
}

.inactivity-modal-ok {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: #14b8a6;
  color: #042f2e;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.inactivity-modal-ok:hover {
  background: #2dd4bf;
}
