/* Control de horas - ajustes para Kaiadmin */

.control-logo { text-decoration: none; }

/* Login page */
.control-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: #f5f7fd;
}

.control-auth-page .container { max-width: 1100px; }

/* Slightly rounder controls to match template */
.card,
.btn,
.form-control,
.form-select,
.alert { border-radius: 12px; }
.form-control {
  border: var(--bs-border-width) solid var(--bs-border-color) !important;
}
select.form-select:not(.form-select-sm) {
  height: 41px;
  margin-top: -1px !important;
}


/* Tighten page inner on very small screens */
@media (max-width: 575.98px) {
  .page-inner { padding-left: 12px; padding-right: 12px; }
  .card-body { padding: 14px; }
}

/* Make tables more finger-friendly */
.table td, .table th { vertical-align: middle; }
@media (max-width: 767.98px) {
  .table td, .table th { padding: 0.6rem; }
  .btn.btn-sm { padding: 0.35rem 0.6rem; }
}

/* Fix select/search lists (user assignment) inside cards */
.control-user-picker {
  max-height: 320px;
  overflow: auto;
}

/* TinyMCE content should not overflow */
.control-richtext img { max-width: 100%; height: auto; }

/* Dashboard task status badges: keep text white, darken background on hover */
a.badge.bg-secondary:hover,
a.badge.bg-primary:hover,
a.badge.bg-success:hover { color: #fff !important; filter: brightness(0.92); }
a.badge.bg-warning:hover { color: #212529 !important; filter: brightness(0.92); }

/* ERP-like tables (all tables by default) */
.table {
  border-collapse: separate;
  border-spacing: 0;
}
.table thead th {
  font-weight: 600;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.table tbody tr:nth-child(odd) {
  background: #f8f9fc;
  background: rgba(0,0,0,.02);
}
.table tbody tr:hover {
  background: #eef3ff;
}
.table td, .table th {
  padding: 0.42rem 0.6rem;
  border-top: 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.table td + td, .table th + th {
  border-left: 1px solid rgba(0,0,0,.04);
}

/* Force assignees alignment left */
.task-assignees{ justify-content:flex-start !important; }

/* Floating help button (mail to support) */
#control-help-fab {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d6efd;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  z-index: 99999;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

#control-help-fab:hover {
  filter: brightness(0.95);
  color: #fff;
}

#control-help-fab:active {
  transform: scale(0.97);
}

@media (max-width: 575.98px) {
  #control-help-fab {
    width: 50px;
    height: 50px;
  }
}

.lang-switcher {
  margin: 0;
}

.lang-switcher-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lang-flag {
  width: 18px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.1);
}


/* Unified filter bar */
.pro-filterbar .form-control, .pro-filterbar .form-select { min-height: 42px; }
.pro-filterbar .btn { min-height: 42px; }
.pro-filterbar .btn:not(.btn-outline-secondary):not(.btn-outline-danger){ background:#0d6efd; border-color:#0d6efd; color:#fff; }
.pro-filterbar .filter-subtitle { display:none; }

.table-striped tbody tr:nth-of-type(odd){background-color:#f8f9fc;}


.avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

@media (max-width: 991.98px) {
  .main-header-logo .logo-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
  }

  .main-header-logo .logo-header .logo {
    justify-self: center;
  }

  .main-header-logo .logo-header .mobile-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-self: end;
  }

  .main-header-logo .logo-header .mobile-header-actions .profile-username {
    display: none;
  }

  .main-header-logo .logo-header .mobile-header-actions .lang-switcher-toggle {
    padding: .25rem .5rem;
  }
  .main-header .navbar-header .topbar-nav {
    display: flex !important;
    flex-direction: row;
    margin-left: auto;
  }

  .main-header .navbar-header .topbar-nav .profile-username {
    display: none;
  }
}
