/* User UI System */
:root {
  --ua-bg: #f6f7fb;
  --ua-surface: #ffffff;
  --ua-surface-2: #f2f5fa;
  --ua-text: #0f172a;
  --ua-muted: #64748b;
  --ua-border: #e2e8f0;
  --ua-primary: #2563eb;
  --ua-primary-600: #1e40af;
  --ua-success: #16a34a;
  --ua-warning: #f59e0b;
  --ua-danger: #ef4444;
  --ua-radius-lg: 16px;
  --ua-radius-md: 12px;
  --ua-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
  --ua-font: "Manrope", "Noto Sans", sans-serif;
}

body.user-app {
  font-family: var(--ua-font);
  color: var(--ua-text);
  background:
    radial-gradient(800px 320px at 8% -6%, rgba(37, 99, 235, 0.12), transparent 60%),
    radial-gradient(700px 280px at 92% -8%, rgba(14, 165, 233, 0.10), transparent 55%),
    var(--ua-bg);
  min-height: 100vh;
}

body.user-app * {
  font-family: var(--ua-font) !important;
}

body.user-app a {
  color: var(--ua-primary);
  text-decoration: none;
}

body.user-app a:hover {
  color: var(--ua-primary-600);
}

.ua-page {
  min-height: 100vh;
  padding: 24px 20px 96px;
  max-width: 980px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .ua-page {
    padding: 32px 32px 120px;
  }
}

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

.ua-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ua-text);
}

.ua-subtitle {
  font-size: 14px;
  color: var(--ua-muted);
  margin-top: 4px;
}

.ua-eyebrow {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ua-muted);
}

.ua-pill {
  background: rgba(15, 23, 42, 0.06);
  color: var(--ua-text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
}

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

.ua-card {
  background: var(--ua-surface);
  border: 1px solid var(--ua-border);
  border-radius: var(--ua-radius-lg);
  padding: 16px;
  box-shadow: var(--ua-shadow);
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.35s ease both;
  animation-delay: calc(var(--delay, 0) * 90ms);
}

.ua-card--soft {
  background: var(--ua-surface-2);
}

.ua-card__label {
  font-size: 12px;
  color: var(--ua-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ua-card__value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 6px;
}

.ua-card__meta {
  font-size: 13px;
  color: var(--ua-muted);
  margin-top: 6px;
}

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

.ua-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ua-list-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ua-list-title {
  font-weight: 600;
  color: var(--ua-text);
}

.ua-list-muted {
  font-size: 13px;
  color: var(--ua-muted);
}

.ua-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--ua-text);
}

.ua-badge--success {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.ua-badge--warning {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.ua-badge--danger {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

.ua-badge--info {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.ua-divider {
  height: 1px;
  background: var(--ua-border);
  margin: 16px 0;
}

.ua-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ua-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ua-btn-primary {
  background: var(--ua-primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.ua-btn-primary:hover {
  background: var(--ua-primary-600);
  color: #fff;
  transform: translateY(-1px);
}

body.user-app a.ua-btn-primary,
body.user-app a.ua-btn-danger,
body.user-app a.ua-btn-success {
  color: #fff;
}

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

.ua-btn-secondary:hover {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.ua-btn-danger {
  background: #dc2626;
  color: #fff;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.25);
}

.ua-btn-danger:hover {
  background: #b91c1c;
  color: #fff;
}

.ua-btn-success {
  background: #16a34a;
  color: #fff;
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.25);
}

.ua-btn-success:hover {
  background: #15803d;
  color: #fff;
}

.ua-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ua-primary);
}

.ua-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ua-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ua-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ua-muted);
  font-weight: 600;
}

.ua-input,
.ua-select,
.ua-textarea,
body.user-app input[type="text"],
body.user-app input[type="date"],
body.user-app input[type="time"],
body.user-app input[type="email"],
body.user-app input[type="number"],
body.user-app select,
body.user-app textarea {
  width: 100%;
  border: 1px solid var(--ua-border);
  border-radius: var(--ua-radius-md);
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
  color: var(--ua-text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.user-app textarea {
  resize: vertical;
}

body.user-app input:focus,
body.user-app select:focus,
body.user-app textarea:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

body.user-app button:disabled {
  background-color: #cbd5f5;
  color: #64748b;
  cursor: not-allowed;
  opacity: 0.7;
}

body.user-app .alert {
  border-radius: var(--ua-radius-md);
  border: 1px solid var(--ua-border);
  box-shadow: var(--ua-shadow);
}

body.user-app .table {
  background: var(--ua-surface);
  border-radius: var(--ua-radius-lg);
  overflow: hidden;
  box-shadow: var(--ua-shadow);
}

body.user-app .table th {
  background: #f8fafc;
  color: var(--ua-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11px;
}

body.user-app .table td {
  vertical-align: middle;
}

body.user-app .fixed-bottom {
  background: transparent;
  border-top: 0;
}

body.user-app .modal-content {
  border-radius: var(--ua-radius-lg);
  border: 0;
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.18);
}

.ua-readonly {
  pointer-events: none;
  background: #f8fafc !important;
  color: var(--ua-text);
}

.ua-readonly::placeholder {
  color: var(--ua-muted);
}

.ua-nav {
  padding: 12px 14px 18px;
}

.ua-nav__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--ua-border);
  border-radius: 18px;
  padding: 8px 10px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(12px);
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
}

.ua-nav__inner::before,
.ua-nav__inner::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 26px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.ua-nav__inner::before {
  left: 0;
  background: linear-gradient(90deg, rgba(248, 250, 252, 0.98), rgba(248, 250, 252, 0));
}

.ua-nav__inner::after {
  right: 0;
  background: linear-gradient(270deg, rgba(248, 250, 252, 0.98), rgba(248, 250, 252, 0));
}

.ua-nav__inner.is-scrollable.is-left::before {
  opacity: 1;
}

.ua-nav__inner.is-scrollable.is-right::after {
  opacity: 1;
}

.ua-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 12px;
  color: #111827;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  min-width: 64px;
}

.ua-nav .ua-nav__item,
.ua-nav .ua-nav__item:hover,
.ua-nav .ua-nav__item:focus,
.ua-nav .ua-nav__item:active {
  color: #111827 !important;
}

.ua-nav__item.is-active {
  color: #111827;
  background: rgba(17, 24, 39, 0.08);
}

.ua-nav__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ua-nav__item svg {
  width: 22px;
  height: 22px;
  fill: currentColor !important;
  stroke: none !important;
}

.ua-nav__inner::-webkit-scrollbar {
  display: none;
}

@media (max-width: 420px) {
  .ua-nav__item {
    min-width: 56px;
    padding: 6px 4px;
  }
  .ua-nav__label {
    font-size: 10px;
  }
}

@media (max-width: 360px) {
  .ua-nav__label {
    display: none;
  }
  .ua-nav__item {
    min-width: 52px;
  }
}

.ua-fichajes .ua-clock-card {
  display: flex;
  justify-content: center;
  align-items: center;
}

.ua-clock-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.ua-time {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ua-floating-btn {
  position: fixed;
  bottom: 100px;
  right: 20px;
  z-index: 99999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background-color: #facc15;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.ua-floating-btn.attention {
  animation: pulse 1.5s infinite;
}

.ua-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--ua-border);
  color: var(--ua-text);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
}

.ua-topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ua-topbar__logo {
  height: 28px;
  width: auto;
  display: block;
  image-rendering: auto;
}

.ua-topbar__name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.ua-topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ua-icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  transition: transform 0.2s ease, background 0.2s ease;
}

.ua-icon-btn:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
  color: #0f172a;
}

.ua-icon-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.ua-icon-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f59e0b;
  border: 2px solid #fff;
}

.ua-topbar .dropdown-menu {
  border-radius: 12px;
  border: 1px solid var(--ua-border);
  box-shadow: var(--ua-shadow);
  padding: 8px;
}

.ua-topbar .dropdown-item {
  border-radius: 8px;
  font-weight: 600;
}

.ua-topbar .dropdown-item-text {
  font-weight: 600;
  color: var(--ua-text);
}

.ua-topbar .dropdown-toggle::after {
  display: none;
}

.ua-logout-btn {
  white-space: nowrap;
}

.clock {
  width: 180px;
  min-height: 180px;
  min-width: 180px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  background-image: url("https://imvpn22.github.io/analog-clock/clock.png");
  background-position: center center;
  background-size: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 -15px 15px rgba(255, 255, 255, 0.05),
    inset 0 -15px 15px rgba(255, 255, 255, 0.05),
    0 15px 15px rgba(0, 0, 0, 0.15),
    inset 0 15px 15px rgba(0, 0, 0, 0.15);
}

.clock:before {
  content: "";
  height: 0.7rem;
  width: 0.7rem;
  background-color: #1f2937;
  border: 2px solid #fff;
  position: absolute;
  border-radius: 50%;
  z-index: 1000;
}

.hour,
.min,
.sec {
  position: absolute;
  display: flex;
  justify-content: center;
  border-radius: 50%;
}

.hour {
  height: 8.5em;
  width: 8.5em;
}

.hour:before {
  content: "";
  position: absolute;
  height: 50%;
  width: 6px;
  background-color: #1f2937;
  border-radius: 6px;
}

.min {
  height: 10em;
  width: 10em;
}

.min:before {
  content: "";
  height: 50%;
  width: 4px;
  background-color: #1f2937;
  border-radius: 4px;
}

.sec {
  height: 11em;
  width: 11em;
}

.sec:before {
  content: "";
  height: 60%;
  width: 2px;
  background-color: #ef4444;
  border-radius: 2px;
}

@media (min-width: 768px) {
  .clock {
    width: 220px;
    min-height: 220px;
    min-width: 220px;
  }

  .ua-time {
    font-size: 40px;
  }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

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