/* static/css/auth.css */

/* Fade-in animation for forms */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Form container styling */
.form-container {
  max-width: 360px;
  margin: 4rem auto;
  background: var(--card-bg);
  color: var(--text);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: fadeIn .3s ease-out;
}
.form-container h2 {
  text-align: center;
  margin-bottom: 1rem;
}

/* Form fields */
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 500;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--header-bg);
  box-shadow: 0 0 4px var(--header-glow);
}

/* Buttons */
.btn {
  display: block;
  width: 100%;
  padding: 0.6rem;
  border: none;
  background: var(--header-bg);
  color: var(--header-text);
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: background .2s, transform .2s;
}
.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* Flash messages */
.flashes {
  list-style: none;
  padding: 0.5rem 1rem;
}
.flashes li {
  margin-bottom: 0.5rem;
}
.flash-success {
  background: #d4edda;
  color: #155724;
  padding: 0.5rem;
  border-radius: 4px;
}
.flash-warning {
  background: #fff3cd;
  color: #856404;
  padding: 0.5rem;
  border-radius: 4px;
}
.flash-danger {
  background: #f8d7da;
  color: #721c24;
  padding: 0.5rem;
  border-radius: 4px;
}

/* Site header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 2000;  /* above mobile menu */
  background: var(--header-bg);
  color: var(--header-text);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.site-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
}

/* Desktop nav links */
.header-links {
  display: flex;
  gap: 1rem;
}
.header-links a {
  color: var(--header-text);
  text-decoration: none;
  font-size: 0.9rem;
}

/* Hamburger toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--header-text);
  cursor: pointer;
  transition: transform .3s ease;
}
.nav-toggle.open {
  transform: rotate(90deg);
}

/* ── Mobile menu (slide-out) ───────────────────────────────────── */
.mobile-menu {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: var(--site-header-height);
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--header-bg);
  z-index: 1000;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease-out;
}
.mobile-menu.active {
  transform: translateX(0);
}
.mobile-menu-item {
  display: flex;
  align-items: center;
  padding: 1.5rem 2rem;
  font-size: 1.4rem;
  color: var(--header-text);
  text-decoration: none;
}
.mobile-menu-item:not(.logout) {
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
/* Pin logout to bottom of menu */
.mobile-menu-item.logout {
  position: absolute;
  bottom: 1rem;
  width: 100%;
}
.mobile-menu-item:hover {
  background: rgba(255,255,255,0.1);
}

/* Icon container */
.menu-icon {
  width: 1.25em;
  text-align: center;
  margin-right: 1rem;
}
.menu-label {
  flex: 1;
}

/* Show hamburger only on mobile, hide desktop links */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .header-links { display: none; }
}

/* Dark-mode checkbox styling */
input[type="checkbox"] {
  transform: scale(1.3);
  margin-left: 0.5rem;
  accent-color: var(--header-glow);
}


/* User table styling */
.table-container {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin: 2rem auto;
  overflow-x: auto;
  animation: fadeIn .3s ease-out;
}
.user-table {
  width: 100%;
  border-collapse: collapse;
}
.user-table th,
.user-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.user-table th {
  background: var(--header-bg);
  color: var(--header-text);
}
.user-table tr:hover {
  background: rgba(0,0,0,0.05);
}
/* Action buttons */
.user-table td:last-child {
  display: flex;
  gap: 0.5rem;
}
.user-table button {
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* MOBILE TABLE SPACING */
@media (max-width: 768px) {
  .table-container { padding: 0.5rem; }
  .user-table th,
  .user-table td {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}

/* Login and settings cards */
.auth-bg {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 0;
  margin: 0;
}

.login-card {
  background: var(--card-bg);
  border-radius: 13px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.14), 0 1.5px 7px rgba(0,0,0,0.06);
  padding: 2.5rem 2.3rem 2rem 2.3rem;
  width: 100%;
  max-width: 380px;
  margin: 3rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  position: relative;
  animation: fadeIn .38s;
}

.login-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--header-bg);
  color: var(--header-text);
  width: 62px;
  height: 62px;
  border-radius: 50%;
  font-size: 2.05rem;
  margin-bottom: 0.7rem;
  box-shadow: 0 2px 14px rgba(0,0,0,0.10);
}

.login-card h2 {
  margin: 0 0 0.9rem 0;
  color: var(--header-bg);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-align: center;
}

.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.18rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.login-label {
  font-weight: 600;
  margin-bottom: 0.06rem;
  color: var(--header-bg);
  letter-spacing: 0.3px;
}

.login-input {
  padding: 0.58rem 0.7rem;
  border: 1.5px solid var(--header-bg);
  border-radius: 6px;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  transition: border-color .18s;
}
.login-input:focus {
  border-color: var(--event-hover);
  outline: none;
}

.login-btn {
  background: var(--header-bg);
  color: var(--header-text);
  border: none;
  padding: .8rem 1.2rem;
  border-radius: 8px;
  font-size: 1.07rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.4rem;
  transition: background .16s, color .18s;
  box-shadow: 0 1px 7px rgba(0,0,0,0.05);
}
.login-btn:hover, .login-btn:focus {
  background: var(--event-hover);
  color: var(--header-bg);
}

.login-flash {
  width: 100%;
  margin-bottom: 1.1rem;
  text-align: center;
}
.login-flash .flash-error {
  background: #ffd0d0;
  color: #d81b60;
  border: 1.3px solid #d81b60;
  border-radius: 6px;
  padding: .6rem;
  margin-bottom: .6rem;
  font-weight: 600;
}
.login-flash .flash-success {
  background: #d7ffd9;
  color: #007800;
  border: 1.3px solid #37c537;
  border-radius: 6px;
  padding: .6rem;
  margin-bottom: .6rem;
  font-weight: 600;
}

@media (max-width: 600px) {
  .login-card {
    padding: 1.2rem .9rem 1.2rem .9rem;
    max-width: 98vw;
  }
}
.settings-card {
  background: var(--card-bg);
  border-radius: 13px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12), 0 1.5px 7px rgba(0,0,0,0.06);
  padding: 2.3rem 2.2rem 2rem 2.2rem;
  width: 100%;
  max-width: 460px;
  margin: 3rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  position: relative;
  animation: fadeIn .32s;
}

.settings-card h2 {
  margin: 0 0 1.1rem 0;
  color: var(--header-bg);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: .8px;
  text-align: center;
}

#ownerSettingsForm {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.18rem;
}

.settings-card .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.44rem;
}

.settings-card label {
  font-weight: 600;
  margin-bottom: 0.09rem;
  color: var(--header-bg);
  letter-spacing: 0.4px;
}

.settings-card input[type="date"],
.settings-card input[type="time"] {
  padding: 0.55rem 0.7rem;
  border: 1.5px solid var(--header-bg);
  border-radius: 7px;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  transition: border-color .18s;
}

.settings-card input:focus {
  border-color: var(--event-hover);
  outline: none;
}

.settings-card .btn,
.settings-card .btn-secondary {
  background: var(--header-bg);
  color: var(--header-text);
  border: none;
  padding: .72rem 1.22rem;
  border-radius: 8px;
  font-size: 1.06rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.3rem;
  transition: background .16s, color .18s;
}
.settings-card .btn-secondary {
  background: var(--event-hover);
  color: var(--header-bg);
  margin-top: 0.6rem;
  margin-bottom: 0.14rem;
}
.settings-card .btn:hover,
.settings-card .btn:focus,
.settings-card .btn-secondary:hover,
.settings-card .btn-secondary:focus {
  background: var(--event-hover);
  color: var(--header-bg);
}

/* Time-entry section for repeatable times */
.settings-card .time-entry {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.38rem;
}
.settings-card .remove-time {
  background: #ffd0d0;
  color: #d81b60;
  border: none;
  border-radius: 5px;
  font-size: 1.22rem;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  transition: background .18s;
}
.settings-card .remove-time:hover {
  background: #d81b60;
  color: #fff;
}

@media (max-width: 600px) {
  .settings-card {
    padding: 1.15rem .85rem 1.2rem .85rem;
    max-width: 98vw;
  }
}