:root {
    --bg : hsl(0, 0%, 10%);
    --bg-light : hsl(0, 0%, 80%);
    --text : hsl(0, 0%, 90%);
}

* {
    padding: 0;
    margin: 0;
}

body {
    font-family: sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* ---------------------------- */

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgb(77, 73, 73);
}

#logo-container {
  display: flex;
    align-items: center;
    padding: 1rem;
    gap: 0.5rem;
}

#logo {
    font-size: 1.3rem;
}

#logo-img {
    height: 1.5rem;
}

#settings {
  padding: 1rem;
}


/*--------------------------------------*/

/*------------------------*/
.main-action {
  padding: 1.5rem 1rem;
  display: flex;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 0.8rem 1.75rem;
  border-radius: 12px;
  border: none;

  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;

  color: rgb(83, 220, 219);
  background: rgb(43, 62, 70);
  border: 1px solid rgb(49, 133, 133);


  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 6px 18px rgba(0, 0, 0, 0.45);

  cursor: pointer;
  transition: all 0.25s ease;
}

.btn i {
  font-size: 16px;
}

#main-btn.sleeping {
  background: rgb(65, 53, 37);
  color: rgb(252, 163, 68);
  border: 1px solid rgb(151, 97, 40);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: scale(0.97);
}


/*---------------------------------*/

#recentTable {
    display: flex;
    justify-content: center;
}

.sleep-card {
  margin-top: 1rem;
  padding: 1rem;
  width: 80%;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(14px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.45);
}

#statusMsg {
  text-align: center;
  font-size: 0.9rem;
  color: #86efac;
  margin-bottom: 12px;
}

.table-wrapper {
  overflow-x: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

th {
  font-weight: 500;
  color: #9ca3af;
  padding-bottom: 6px;
}

tbody tr {
  border-top: 1px solid rgba(255,255,255,0.07);
}

td {
  padding: 10px 4px;
  text-align: center;
  color: #e5e7eb;
}

.delete-btn {
  background: none;
  border: none;
  color: #f87171;
  font-size: 1rem;
  padding: 5px;
}

/*--------------------------*/
.chart-container {
    width: 80%;
    max-width: 800px;
    margin: 60px auto;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    padding: 1rem;
}

#emptyState {
  text-align: center;
  color: #9ca3af;
}

#noDataImg {
  width: 120px;
  opacity: 0.7;
}

.hidden {
  display: none;
}

/*-----------toast-----------*/

#toast-root {
  position: fixed;
  bottom: 18px;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  min-width: 170px;
  max-width: 90vw;
  padding: 14px 16px;
  border-radius: 12px;

  display: flex;
  align-items: center;
  gap: 12px;

  font-size: 14px;
  font-weight: 500;

  background: rgba(20, 20, 20, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);

  opacity: 0;
  transform: translateY(16px);
  animation: toast-in 0.35s ease forwards;
}

/* SUCCESS (your idea refined) */
.toast.success {
  background: #2a3c3a;
  color: #4cde7a;
}

/* DELETE */
.toast.delete {
  background: #3c2a2a;
  color: #f87171;
}

/* INFO */
.toast.info {
  background: #2a2f3c;
  color: #93c5fd;
}

.toast i {
  font-size: 16px;
}

/* animations */
@keyframes toast-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(16px);
  }
}


/*---------- EDIT the logs-----------*/

/* Modal backdrop */
.edit-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  z-index: 50;
}

.edit-modal.hidden {
  display: none;
}

/* Bottom sheet */
.edit-sheet {
  width: 90%;
  background: #0f172a;
  border-radius: 16px 16px 0 0;
  padding: 1.2rem;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.25s ease;
}

.edit-sheet h3 {
  margin-bottom: 1rem;
  color: #e5e7eb;
  font-size: 1.1rem;
}

/* Inputs */
.edit-sheet label {
  display: block;
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 0.8rem;
}

.edit-sheet input {
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.5rem;
  border-radius: 8px;
  border: none;
  background: #020617;
  color: #e5e7eb;
  font-size: 0.95rem;
}

/* Actions */
.edit-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.cancel-btn,
.save-btn {
  flex: 1;
  padding: 0.6rem;
  border-radius: 10px;
  border: none;
  font-weight: 600;
}

.cancel-btn {
  background: #020617;
  color: #9ca3af;
}

.save-btn {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: white;
}

/* Animation */
@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/*-----------------------*/