@import url('https://fonts.googleapis.com/css2?family=Shrikhand&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=DM+Serif+Display:ital@0;1&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:       #007BFF;
  --blue-hover: #0066d6;
  --blue-light: #e8f2ff;
  --blue-mid:   #cce0ff;
  --bg:         #ffffff;
  --bg2:        #f7f8fa;
  --bg3:        #eef0f4;
  --border:     #e4e7ec;
  --border2:    #d0d5dd;
  --text:       #101828;
  --text2:      #344054;
  --text3:      #667085;
  --text4:      #98a2b3;
  --danger:     #d92d20;
  --danger-bg:  #fff5f5;
  --danger-bdr: #fda29b;
  --success:    #027a48;
  --success-bg: #ecfdf3;
  --success-bdr:#abefc6;
  --font-mark:  'Shrikhand', cursive;
  --font-body:  'DM Sans', sans-serif;
  --font-serif: 'DM Serif Display', serif;
  --r:          8px;
  --rsm:        6px;
  --nav-h:      58px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* NAV */
.t-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h); background: var(--blue);
  display: flex; align-items: center; padding: 0 24px;
}
.t-nav-inner {
  max-width: 1080px; margin: 0 auto; width: 100%;
  display: flex; align-items: center;
}
.t-logo {
  font-family: var(--font-mark); font-size: 22px;
  color: #fff; text-decoration: none; flex-shrink: 0;
}
.t-nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.t-nav-link {
  font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.82);
  text-decoration: none; padding: 6px 12px; border-radius: var(--rsm);
  transition: color 0.15s, background 0.15s;
}
.t-nav-link:hover { color: #fff; background: rgba(255,255,255,0.13); }
.t-nav-link.active { color: #fff; }
.t-btn-nav {
  font-size: 13px; font-weight: 600; font-family: var(--font-body);
  color: var(--blue); background: #fff; border: none;
  border-radius: var(--rsm); padding: 7px 16px;
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: opacity 0.15s;
}
.t-btn-nav:hover { opacity: 0.9; }
.t-nav-user { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.85); }
.t-nav-avatar { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,0.25); object-fit: cover; border: 1.5px solid rgba(255,255,255,0.35); }

/* BUTTONS */
.t-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 20px;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  border-radius: var(--r); border: none; cursor: pointer;
  transition: all 0.15s; text-decoration: none; white-space: nowrap; line-height: 1;
}
.t-btn-primary { background: var(--blue); color: #fff; }
.t-btn-primary:hover { background: var(--blue-hover); }
.t-btn-ghost { background: #fff; color: var(--text2); border: 1.5px solid var(--border2); }
.t-btn-ghost:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }
.t-btn-danger { background: var(--danger-bg); color: var(--danger); border: 1.5px solid var(--danger-bdr); }
.t-btn-danger:hover { background: #ffe8e6; }
.t-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.t-btn-full { width: 100%; }
.t-btn-sm { padding: 7px 14px; font-size: 13px; }

/* INPUTS */
.t-input {
  width: 100%; padding: 10px 13px;
  background: #fff; border: 1.5px solid var(--border2);
  border-radius: var(--r);
  font-family: var(--font-body); font-size: 14px; color: var(--text); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.t-input::placeholder { color: var(--text4); }
.t-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,123,255,0.1); }
textarea.t-input { resize: vertical; min-height: 90px; line-height: 1.6; }
select.t-input {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23667085' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
.t-label { font-size: 13px; font-weight: 600; color: var(--text2); display: block; margin-bottom: 6px; }
.t-field { margin-bottom: 18px; }
.t-field:last-child { margin-bottom: 0; }
.t-field-err { font-size: 12px; color: var(--danger); margin-top: 5px; display: none; }
.t-field-err.show { display: block; }

/* CARD */
.t-card { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); padding: 20px; }
.t-card-blue { background: var(--blue-light); border: 1.5px solid var(--blue-mid); border-radius: var(--r); padding: 20px; }

/* BADGE */
.t-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 99px; }
.t-badge-blue { background: var(--blue-light); color: var(--blue); border: 1px solid var(--blue-mid); }
.t-badge-green { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-bdr); }
.t-badge-gray { background: var(--bg3); color: var(--text3); border: 1px solid var(--border); }

/* SPINNER */
.t-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(0,123,255,0.2); border-top-color: var(--blue); animation: t-spin 0.65s linear infinite; flex-shrink: 0; }
.t-spin-white { border-color: rgba(255,255,255,0.3) !important; border-top-color: #fff !important; }
@keyframes t-spin { to { transform: rotate(360deg); } }

/* TOAST */
.t-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(12px); z-index: 9999; padding: 10px 20px; background: var(--text); color: #fff; border-radius: var(--r); font-size: 13px; font-weight: 500; opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none; white-space: nowrap; }
.t-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* DIVIDER */
.t-divider { height: 1px; background: var(--border); margin: 20px 0; }

/* UTILS */
.t-wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.t-wrap-sm { max-width: 480px; margin: 0 auto; padding: 0 20px; }

/* CODE */
.t-code { background: var(--bg2); border: 1.5px solid var(--border); border-radius: var(--r); padding: 11px 14px; font-family: 'SF Mono', 'Fira Code', monospace; font-size: 13px; color: var(--text); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.t-code span { word-break: break-all; }
.t-copy-btn { font-size: 12px; font-family: var(--font-body); font-weight: 600; color: var(--text3); background: #fff; border: 1.5px solid var(--border); border-radius: var(--rsm); padding: 4px 10px; cursor: pointer; flex-shrink: 0; transition: color 0.15s, border-color 0.15s; }
.t-copy-btn:hover { color: var(--blue); border-color: var(--blue); }

@keyframes t-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.t-up  { animation: t-up 0.38s ease both; }
.t-up2 { animation: t-up 0.38s 0.07s ease both; }
.t-up3 { animation: t-up 0.38s 0.14s ease both; }
