
  @font-face {
  font-family: 'Vazirmatn';
  src: url('/assets/fonts/Vazirmatn[wght].woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap; 
}

    body { font-family: 'Vazirmatn'}
    ::placeholder {
  font-family: 'Vazirmatn', sans-serif;
}
input, button, textarea {
  font-family: 'Vazirmatn', sans-serif;
  text-align: right;
}
input::placeholder,
textarea::placeholder {
  text-align: center;
}
*{
      transition: all 0.25s ease;
}

    /* :root{
      --primary:#6C5CE7;
      --primary-dark:#584bd1;
      --accent:#00d1b27c;
      --warning:#FFB020;
      --danger:#E05666;
      --bg1:#eef2f7;
      --text:#1f2937;
      --muted:#5b6474;
      --card-bg:rgba(255,255,255,0.96);
      --table-header:linear-gradient(90deg,#6C5CE7,#7F8CFF);
      --header-text:#ffffff;
    } */

 .root2{
      --primary:#0288D1; /* آبی روشن */

--primary-dark:#01579B;

--accent:#00d1b27c;

--warning:#FFA000;

--danger:#D84315;

--bg1:#ECEFF1;

--text:#263238;

--muted:#607D8B;

--card-bg:rgba(255,255,255,0.96);

--table-header:linear-gradient(90deg,#0288D1,#26C6DA);

--header-text:#ffffff;
    }

/* .root{
  --primary:#FF7A00; 

--primary-dark:#CC6300;

--accent:#0097A7; /

--warning:#FFD54F; 

--danger:#E53935; 

--bg1:#F9FAFB;

--text:#212121;

--muted:#757575;

--card-bg:rgba(255,255,255,0.96);

--table-header:linear-gradient(90deg,#FF7A00,#FFB300);

--header-text:#ffffff;
 */
 

    *{box-sizing:border-box}
    html,body{height:100%}
    body{
      font-family:'Vazirmatn';
      background: radial-gradient(1200px 400px at -10% -10%, #ffb347  0, transparent 50%),
                  radial-gradient(1200px 400px at 110% 110%, #ffcc33  0, transparent 50%),
                  var(--bg1);
      color:var(--text);
      margin:0;
          user-select: none;      /* modern browsers */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE/Edge */
    }
    h1,h2,h3{margin:10px 0;text-align:center}
    .container{max-width:1100px;margin:auto;padding:20px}

    /* Cards - glassy look */
    .card{background:var(--card-bg);backdrop-filter:blur(6px);padding:20px;margin-bottom:20px;border-radius:18px;box-shadow: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
}
    
    .card2{display:flex; background:var(--card-bg);backdrop-filter:blur(6px);padding:20px;margin-bottom:20px;border-radius:18px;box-shadow:0 10px 25px rgba(0,0,0,.08)}
    .left, .right {
  flex: 1;             /* each takes 50% */
  display: flex;
  flex-direction: column; /* stack content top → bottom */
  padding: 10px;
  border: 1px solid #ddd;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

    .cardac{background:var(--accent);backdrop-filter:blur(6px);padding:20px;margin-bottom:20px;border-radius:18px;box-shadow:0 10px 25px rgba(0,0,0,.08); color:#111}
    .form-group{margin-bottom:14px}
    label{display:block;margin-bottom:6px;font-weight:600;color:var(--muted)}
    input{width:100%;padding:12px;border:1px solid #d1d5db;border-radius:12px;font-size:1rem;background:#fff;color:#111}
    input[type="file"]{padding:8px}
    button{  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);;color:#fff;border:none;padding:10px 18px;border-radius:12px;cursor:pointer;font-weight:600;transition:.2s transform,.25s background}
    button:hover{background:var(--primary-dark);  transform: translateY(-2px) scale(1.03); color: #fafbff}
    .btn-ghost{display:flex; background:#fff;color:var(--primary);border:1px solid #c7d2fe; padding:8px}
    .btn-ghost2{display:flex; background:#fff;color:var(--primary);border:2px solid #c7d2fe; padding-top:8px}
    .logout{display:flex; background:var(--danger)}

/* Floating button */
#fab{
  position: fixed;
  bottom: 20px; right: 20px;
  width: 56px; height: 56px;
  border: none; border-radius: 50%;
  background:#01579B; color:#fff;
  display:flex; align-items:center; justify-content:center; /* ← centers icon */
  box-shadow: 0 4px 8px rgba(0,0,0,.3);
  cursor:pointer; transition: transform .2s;
  z-index: 1000;
}
#fab:hover{ transform: scale(1.1); }
#fab svg{ display:block; }
/* Start hidden; show it only when logged in via JS if you prefer */
#fab{ display:none; }


/* Modal backdrop */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  justify-content: center;
  align-items: center;
}

/* Modal content */
.modal-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  width: 300px;
  animation: pop .3s ease;
}
@keyframes pop {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.close {
  float: right;
  font-size: 24px;
  cursor: pointer;
}


    /* Grid layout */
    .grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}
    @media(max-width:900px){.grid{grid-template-columns:1fr}}

    /* Profile / welcome */
    .avatar-small {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 5px;
  vertical-align: middle;
}

.avatar-large {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px;
  vertical-align: middle;
}

.avatar-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9em;
}

.highlight-me {
  background: #fde68a; /* yellow highlight */
}
    .welcome{display:flex;align-items:center;gap:14px;justify-content:center;margin-bottom:12px;flex-wrap:wrap}
    .welcome2{display:flex;align-items:center;gap:14px;justify-content:center;margin-bottom:12px;flex-wrap:wrap}

    .avatar-big{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;font-size:30px;background:#f3f4ff;border:2px solid #dfe3ff;overflow:hidden}
    .avatar-big img{width:100%;height:100%;object-fit:cover}
    .welcome .name{font-weight:700}
    #rankBadges{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin:12px 0}
    .badge{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;font-size:.9rem;background:#eef2ff;color:#3b3bb3;border:1px solid #c7d2fe}
    .badge.dot{width:8px;height:8px;border-radius:50%}
    .dot.hours{background:#7F8CFF}
    .dot.questions{background:#00B894}
    .dot.wake{background:#FFB020}

    .quote-box{background:#f0f8ff;border-left:6px solid var(--primary);padding:14px;border-radius:12px;font-style:italic;text-align:center}

    /* Status chips */
    .chips{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:10px}
    .chip{padding:6px 10px;border-radius:999px;font-size:.85rem;border:1px solid #e5e7eb}
    .chip.ok{background:#ecfeff;border-color:#a5f3fc}
    .chip.miss{background:#fff1f2;border-color:#fecdd3}
    .today-banner{display:flex;justify-content:center;gap:8px;align-items:center;margin:6px 0 14px 0;font-weight:700}
    .today-chip{border:1px solid #c7d2fe;background:#eef2ff;padding:6px 10px;border-radius:999px}
/*title-card*/

.title-card-proton {
  max-width: 600px;
  margin: 20px auto;
  padding: 20px 30px;
  text-align: center;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.1);  /* شیشه‌ای */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}
.title-card-proton .title-logo {
    width: 50vw; /* 30% of viewport width */
    max-width: 350px;
    height: auto;
}

.title-card-proton:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}



/*history table more/less show*/
.history-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1rem;
}

.history-buttons {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
}

.history-buttons button {
  padding: 0.4rem 1.2rem;
  font-size: 0.85rem;
  background-color: #2563eb;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.history-buttons button:hover {
  background-color: #1e40af;
}

.history-buttons button:active {
  transform: scale(0.97);
}


    /* Tables - pretty */
    .tables{margin-top:10px}
    .table-bar{display:flex;gap:10px;align-items:center;justify-content:space-between;margin:8px 0 6px 0;flex-wrap:wrap}
    .means{display:flex;gap:8px;flex-wrap:wrap}
    .mean-chip{padding:6px 10px;border-radius:999px;border:1px solid #e2e8f0;background:#fff;color:#334155;font-size:.85rem}
    .mean-chip.good{background:#d1fae5;border-color:#a7f3d0;color:#065f46}
    .mean-chip.bad{background:#fee2e2;border-color:#fecaca;color:#7f1d1d}

    table{width:100%;border-collapse:separate;border-spacing:0;border-radius:14px;overflow:hidden;box-shadow:0 8px 18px rgba(0,0,0,.06)}
    th{padding:12px 10px;color:var(--header-text);background:var(--table-header);text-transform:uppercase;letter-spacing:.03em;font-size:.85rem}
    td{padding:12px 10px;background:#fff;border-bottom:1px solid #eef2f7;color:#111}
    tr:nth-child(even) td{background:#fafbff}
    tr:hover td{background:#f5f6ff}
    .cell-name{display:flex;align-items:center;gap:8px;justify-content:center}
    .avatar{font-size:1.1rem;background:#f3f4ff;border:1px solid #e5e7eb;border-radius:50%;width:28px;height:28px;display:grid;place-items:center;overflow:hidden}
    .avatar img{width:100%;height:100%;object-fit:cover}
    .highlight td{background:#88E788 !important;font-weight:700}
.leaderboard-row.me {
  background-color: #88E788;  /* light yellow */
  font-weight: bold;
}
.lb-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 6px;
}
.lb-emoji {
  font-size: 22px;
  margin-right: 6px;
}
tr.me {
  background: #88E788; /* light blue highlight for current user */
  font-weight: bold;
}

    /* Make tables smaller on phones (no horizontal scroll) */
    @media(max-width:600px){
      h1{font-size:1.4rem}
      h2{font-size:1.1rem}
      h3{font-size:1rem}
      .container{padding:14px}
      .card{padding:16px}
      table{font-size:.82rem}
      th,td{padding:8px 6px}
      .badge{font-size:.8rem;padding:5px 8px}
      .avatar-big{width:52px;height:52px;font-size:24px}
      .mean-chip{font-size:.8rem}
    }

@keyframes fall { to { transform: translateY(110vh) rotate(600deg); opacity: 0.9; } }

/*toast*/
.toast-container{position:fixed;right:16px;bottom:16px;display:flex;flex-direction:column;gap:8px;z-index:9999}
.toast{min-width:260px;max-width:80vw;background:#fff;border:1px solid #e5e7eb;border-left:6px solid #6C5CE7;padding:10px 12px;border-radius:12px;box-shadow:0 10px 24px rgba(0,0,0,.12);animation:slideIn .25s ease}
.toast.success{border-left-color:#16a34a}
.toast.error{border-left-color:#E05666}
.toast .title{font-weight:700;margin-bottom:2px}
@keyframes slideIn{from{transform:translateY(10px);opacity:0}to{transform:translateY(0);opacity:1}}
/*badges fix*/
#badgesList{display:flex;flex-wrap:wrap;gap:6px}
.badge{background:#fef3c7;border:1px solid #fcd34d;border-radius:12px;padding:4px 8px;font-size:0.9rem}
/*goals*/

.progress {
  width: 100%;
  height: 20px;
  background: #eee;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4caf50, #81c784);
  text-align: center;
  color: white;
  font-size: 12px;
  line-height: 20px;
  transition: width 0.4s ease;
}

.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  width: 300px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.goal-input {
  width: 100%;
  padding: 6px;
  margin: 8px 0 16px 0;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
}
/*Badge hallway*/
.badges-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.badges-modal.hidden { display: none; }

.badges-modal-content {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  max-width: 600px;
  width: 80%;
  max-height: 80%;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  position: relative;
}

.badges-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.badge-card {
    border: 1px solid #ddd;
    padding: 1rem;
    margin: 0.5rem;
    border-radius: 0.5rem;
    text-align: center;
}
.badge-card.earned {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1e3a8a;
  font-weight: 600;
}
.badge-card.locked {
  filter: grayscale(100%);
  opacity: 0.6;
}
.badge-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}
.badge-name { font-size: 0.9rem; font-weight: bold; }
.badge-desc { font-size: 0.75rem; color: #4b5563; }

#badgesModal {
  position: fixed;
  inset: 0; /* shorthand for top:0; right:0; bottom:0; left:0 */
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;

  opacity: 0;
  pointer-events: none;
  transform: scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#badgesModal.show {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

#badgesModal.hidden {
  display: none;
}
.ld {
  display: flex;
}

    /* Dark mode */
    .toolbar{display:flex;justify-content:center;gap:10px;margin-bottom:10px; padding-top: 8;}

    .note {
  display: block;       /* make it take full width */
  text-align: center;   /* center the text */
}

.modal.change-password-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.change-password-modal .modal-content {
  background: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 10px;
  width: 320px;
  text-align: right;
  position: relative;
}

.change-password-modal .close-btn {
  position: absolute;
  left: 10px;
  top: 10px;
  font-size: 22px;
  cursor: pointer;
}


#changePasswordModal {
  display: none; /* پیش‌فرض بسته */
  position: fixed;
  z-index: 1000; /* بالا بیاد */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5); /* بک‌دراپ تیره */
}

#changePasswordModal .modal-content {
  background: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
}

.tabs {
  display:flex;
  gap:10px;
  margin-bottom:15px;
}

.tab-btn {
  padding:8px 16px;
  cursor:pointer;
  border:none;
  background:#eee;
  border-radius:5px;
}

.tab-btn.active { background:#4f46e5; color:white; }

.me-highlight {
  display:flex;
  align-items:center;
  gap:10px;
  background:#fef3c7;
  padding:8px;
  border-radius:10px;
  margin-bottom:5px;
}

.me-highlight img {
  width:40px;
  height:40px;
  border-radius:50%;
  border:1px solid #ccc;
}

.table-wrapper {
  max-height: 250px;          /* collapsed height */
  overflow: hidden;
  transition: max-height 0.5s ease;  /* smooth transition */
  border-radius: 1rem;
}

.toggle-table-btn {
  margin-top:5px;
  padding:5px 10px;
  font-size:12px;
  cursor:pointer;
  background:#ddd;
  border:none;
  border-radius:5px;
}

.leaderboard-photo {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 5px;
  vertical-align: middle;
}
.leaderboard-photo-large {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px;
  vertical-align: middle;
}

.table-wrapper {
  max-height: 250px;         /* collapsed height */
  overflow: hidden;
  transition: max-height 0.4s ease;
  border-radius: 1rem;       /* nice rounded look */
}

.table-wrapper.expanded {
  max-height: 1000px;        /* large enough to fit full table */
  border-radius: 0;          /* flatten corners when open */
}

.toggle-table-btn {
  display: block;
  margin: 10px auto;
  cursor: pointer;
  background: #f3f4f6;
  border: none;
  border-radius: 1rem;
  padding: 6px 14px;
  font-size: 14px;
}


/*Confeti*/
.confetti-piece{
  position: fixed; width:8px; height:14px; top:-10px; opacity:.9; z-index:9998;
  animation: fall linear forwards;
}
@keyframes fall { to { transform: translateY(110vh) rotate(600deg); opacity: 0.9; } }



