/* =========================
   ROOT THEME
========================= */
:root {
  --bg-main: #061c1f;
  --bg-card-top: rgba(10, 35, 40, 0.95);
  --bg-card-bottom: rgba(5, 15, 18, 0.95);

  --accent-primary: #4fffe2;
  --accent-secondary: #2be1ff;

  --text-primary: #ffffff;
  --text-secondary: #b6dedd;
  --text-muted: #9fdad7;

  --danger: #ff6b6b;
}

/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* =========================
   BACKGROUND
========================= */
body {
  background: radial-gradient(
    circle at top left,
    #2fe0c3,
    #0b3a3f 40%,
    #061c1f 100%
  );
  color: var(--text-primary);
}

/* =========================
   CENTER LAYOUT
========================= */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* =========================
   AUTH / DASHBOARD CARD
========================= */
.auth-card,
.dashboard-card {
  width: 100%;
  max-width: 380px;
  background: linear-gradient(
    180deg,
    var(--bg-card-top),
    var(--bg-card-bottom)
  );
  border-radius: 28px;
  padding: 28px 24px 30px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6);
}

/* =========================
   AUTH ICON
========================= */
.auth-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #4fffe2, #1aa39a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  box-shadow: 0 0 40px rgba(79,255,226,0.6);
}

/* =========================
   TITLES
========================= */
.auth-title {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
}

.auth-subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.dashboard-header h2 {
  margin: 0;
  font-size: 22px;
}

.dashboard-header p {
  margin: 6px 0 22px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* =========================
   INPUTS
========================= */
.field {
  margin-bottom: 14px;
}

.field input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border-radius: 18px;
  border: none;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 15px;
}

.field input::placeholder {
  color: var(--text-muted);
}

.field input:focus {
  outline: 2px solid var(--accent-primary);
}

/* =========================
   BUTTONS
========================= */
.primary-btn,
.auth-card button {
  width: 100%;
  height: 52px;
  border-radius: 22px;
  border: none;
  background: linear-gradient(135deg, #4fffe2, #2be1ff);
  color: #003033;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(79,255,226,0.5);
}

.primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* =========================
   STATS
========================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}

.stat-card {
  background: rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 14px 10px;
  text-align: center;
}

.stat-card h3 {
  margin: 0;
  font-size: 18px;
}

.stat-card span {
  font-size: 12px;
  color: var(--text-muted);
}

/* =========================
   ROUTINES
========================= */
.section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

/* Scroll container */
.routine-list {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  padding-right: 6px;
}

/* Scrollbar */
.routine-list::-webkit-scrollbar {
  width: 4px;
}

.routine-list::-webkit-scrollbar-thumb {
  background: rgba(79,255,226,0.4);
  border-radius: 10px;
}

/* Routine row */
.routine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
}

.routine.active {
  outline: 2px solid var(--accent-primary);
  box-shadow: 0 0 18px rgba(79,255,226,0.25);
}

.routine h4 {
  margin: 0;
  font-size: 15px;
}

/* Right actions */
.routine-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.play {
  color: var(--accent-primary);
}

/* Icon buttons */
.icon-btn {
  background: rgba(255,255,255,0.08);
  border: none;
  border-radius: 10px;
  width: 32px;
  height: 32px;
  color: #9fdad7;
  cursor: pointer;
}

.icon-btn.delete {
  color: #ff8a8a;
}

.icon-btn:hover {
  background: rgba(255,255,255,0.15);
}

/* Add routine */
.routine-add {
  justify-content: center;
  border: 1.5px dashed rgba(79,255,226,0.4);
  background: rgba(255,255,255,0.03);
  color: var(--accent-primary);
  font-weight: 600;
}

/* =========================
   TEXT HELPERS
========================= */
.muted-text {
  font-size: 14px;
  color: var(--text-muted);
}
/* EDIT ICON (CLEAN, NO EMOJI) */
.icon-btn.edit {
  position: relative;
}

/* Pencil body */
.icon-btn.edit::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 3px;
  background: var(--accent-primary);
  border-radius: 2px;
  transform: rotate(-45deg);
}

/* Pencil tip */
.icon-btn.edit::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent-primary);
  border-radius: 1px;
  transform: translate(6px, 6px);
}
/* ACTION ICON BASE */
.icon-btn {
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.icon-btn:hover {
  background: rgba(255,255,255,0.12);
  transform: scale(1.05);
}

/* EDIT ICON – CLEAN */
.icon-btn.edit::before {
  content: "";
  width: 14px;
  height: 3px;
  background: var(--accent-primary);
  border-radius: 2px;
  transform: rotate(-45deg);
}

.icon-btn.edit::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent-primary);
  border-radius: 1px;
  transform: translate(6px, 6px);
}

/* DELETE */
.icon-btn.delete {
  color: #ff8a8a;
}
.secondary-btn {
  display: block;
  width: 100%;
  height: 48px;
  line-height: 48px;
  margin-top: 14px;
  border-radius: 20px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--accent-primary);
  background: rgba(255,255,255,0.06);
  border: 1px dashed rgba(79,255,226,0.4);
  text-decoration: none;
}
