/* =========================================================
   🟢 GLOBAL COACHREPLAY STYLES
   ========================================================= */
html,
body {
  height: 100%;
  margin: 0;
  background: linear-gradient(
    160deg,
    rgba(13, 15, 18, 0.96) 0%,
    rgba(17, 20, 24, 0.95) 100%
  );
  color: #e9ecef;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

video {
  border-radius: 8px;
}

/* =========================================================
   🔵 LOGIN WRAPPER & CARD
   ========================================================= */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.login-card {
  background-color: rgba(30, 33, 37, 0.9);
  border: 1px solid rgba(60, 65, 70, 0.4);
  border-radius: 1.2rem;
  padding: 2.5rem;
  max-width: 380px;
  width: 90%;
  text-align: center;
}

/* =========================================================
   🟣 LOGIN LOGO
   ========================================================= */
.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 1.8rem;
}

.login-logo img {
  height: 60px;
  width: auto;
}

.login-logo span {
  font-size: 1.8rem;
  font-weight: 600;
  color: #f8f9fa;
  letter-spacing: 0.5px;
}

/* =========================================================
   🟡 FORM FIELDS (dark theme)
   ========================================================= */
.form-control {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e5e5e5;
  transition: all 0.2s ease;
}

.form-control:focus {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: #34c759;
  color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(52, 199, 89, 0.25);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

input:-webkit-autofill {
  -webkit-text-fill-color: #e5e5e5 !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* =========================================================
   🟢 BUTTONS
   ========================================================= */
.btn-login {
  background-color: #28a745;
  color: #000;
  border: none;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.75rem;
  transition: all 0.2s ease;
}

.btn-login:hover {
  background-color: #34c759;
  transform: translateY(-1px);
}

/* =========================================================
   🟠 ALERTS & LINKS
   ========================================================= */
.alert {
  font-size: 0.9rem;
  padding: 0.6rem;
  border-radius: 0.4rem;
}

.login-links {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: #bbb;
}

.login-links a {
  color: #34c759;
  text-decoration: none;
  font-weight: 500;
}

.login-links a:hover {
  text-decoration: underline;
}

/* =========================================================
   🔴 NAVBAR
   ========================================================= */
.navbar .nav-link {
  color: #ccc !important;
  transition: color 0.2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: #34c759 !important;
}

.navbar-brand img {
  filter: drop-shadow(0 0 2px rgba(52, 199, 89, 0.3));
}

.navbar {
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeInNavbar 0.6s ease forwards;
  animation-delay: 0.1s;
  position: relative;
  z-index: 1000; 
}

@keyframes fadeInNavbar {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   🔵 MEDIA QUERIES – General
   ========================================================= */

@media (max-width: 576px) {
  .login-card {
    max-width: 90%;
    padding: 2rem 1.2rem;
    border-radius: 1rem;
  }

  .login-logo img {
    height: 55px;
  }

  .login-logo span {
    font-size: 1.5rem;
  }
}

/* =========================================================
   🟣 FILTER BUTTON BAR (general)
   ========================================================= */
.filter-bar {
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 576px) {
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-bar .btn-group .btn {
    width: 50%;
  }
}


/* =========================================================
   ✅ Patch: synlig .text-muted i dark theme
   ========================================================= */

/* Grund: lite ljusare än Bootstrap men fortfarande dämpad */
.text-muted {
  color: rgba(220, 220, 220, 0.72) !important;
}

/* Inuti mörka kort/tabeller – höj kontrasten ett snäpp */
.card.bg-dark .text-muted,
.table .text-muted,
#userTable .text-muted {
  color: rgba(235, 235, 235, 0.78) !important;
}

/* Små hjälpetexter, t.ex. under inputs */
.form-text,
.small.text-muted,
.muted {
  color: rgba(230, 230, 230, 0.75) !important;
}

/* Disabled labels/controls – lite svagare men läsbart */
label.disabled,
.form-control:disabled ~ .form-text,
.text-muted.disabled {
  color: rgba(210, 210, 210, 0.6) !important;
}

/* Placeholder för konsekvent ton i dark */
::placeholder {
  color: rgba(235, 235, 235, 0.45) !important;
}


/* =========================================================
   ✨ ADMIN ACTION BUTTONS (Balanced + Visible)
   ========================================================= */

/* Gemensam bas för små knappar i tabeller */
.btn-admin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  border-radius: 0.5rem;
  height: 34px;
  width: 34px;
  transition: all 0.2s ease;
  line-height: 1;
}

/* ✏️ EDIT */
.btn-admin-edit {
  background: #2e3237;
  color: #e9ecef;
}
.btn-admin-edit:hover {
  background: #3a3f45;
  color: #34c759;
  transform: translateY(-1px);
  box-shadow: 0 0 6px rgba(52, 199, 89, 0.3);
}

/* 🗑 DELETE */
.btn-admin-delete {
  background: #c92a2a;
  color: #fff;
}
.btn-admin-delete:hover {
  background: #ff4d5e;
  transform: translateY(-1px);
  box-shadow: 0 0 6px rgba(255, 77, 94, 0.4);
}

/* ➕ ADD */
.btn-admin-add {
  background: #34c759;
  color: #0e0f11;
  font-weight: 600;
  border: none;
  border-radius: 0.6rem;
  padding: 0.55rem 1.25rem;
  font-size: 0.95rem;
  height: 42px;           
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-admin-add i {
  margin-right: 6px;
  font-size: 1.1rem;
}

.btn-admin-add:hover {
  background: #3fe96c;
  transform: translateY(-1px);
  box-shadow: 0 0 6px rgba(52, 199, 89, 0.4);
}

@media (min-width: 768px) {
  .btn-admin-add {
    margin-left: 0.5rem;
  }
}

/* Bas – gemensam för Create/Save/Confirm */
.btn-admin-save,
.btn-admin-create {
  background: #34c759;
  color: #0e0f11;
  font-weight: 600;
  border: none;
  border-radius: 0.6rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 42px;
  transition: all 0.2s ease;
}

/* Hover */
.btn-admin-save:hover,
.btn-admin-create:hover {
  background: #3fe96c;
  transform: translateY(-1px);
  box-shadow: 0 0 6px rgba(52, 199, 89, 0.45);
}

/* Disabled */
.btn-admin-save:disabled,
.btn-admin-create:disabled {
  background: #3a3f45;
  color: #999;
  cursor: not-allowed;
  box-shadow: none;
}

/* Ikonjustering */
.btn-admin-save i,
.btn-admin-create i {
  font-size: 1.1rem;
  margin-right: 0.3rem;
}

/* Mörk bakgrundskomplement (t.ex. Avbryt-knappar) */
.btn-admin-cancel {
  background: #2b2f34;
  color: #e9ecef;
  border: none;
  border-radius: 0.6rem;
  padding: 0.6rem 1.25rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-admin-cancel:hover {
  background: #3a3f45;
  color: #fff;
  transform: translateY(-1px);
}

/* Anpassning för modal-footer */
.modal-footer .btn-admin-save,
.modal-footer .btn-admin-create,
.modal-footer .btn-admin-cancel {
  min-width: 110px;
}

/* Mobil – fyll bredden i små modaler */
@media (max-width: 576px) {
  .modal-footer {
    flex-direction: column;
    gap: 0.5rem;
  }

  .modal-footer .btn-admin-save,
  .modal-footer .btn-admin-create,
  .modal-footer .btn-admin-cancel {
    width: 100%;
  }
}

/* =========================================================
   🟥 Account Deletion Overlay
   ========================================================= */
.deleting-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 20, 0.9);
  backdrop-filter: blur(3px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  color: #e9ecef;
  font-family: "Inter", sans-serif;
}

.deleting-spinner {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-top-color: #dc3545;
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
  margin-bottom: 20px;
}

.deleting-text {
  font-size: 1.2rem;
  letter-spacing: 0.5px;
  color: #dee2e6;
}

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