@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg:#09090f; --bg2:#101018; --surface:#17171f; --surface2:#1e1e28;
  --border:rgba(255,255,255,0.06); --border2:rgba(255,255,255,0.11);
  --text:#eeeef6; --text2:#8888a8; --text3:#52526a;
  --accent:#6c63f5; --accent2:#9d96ff;
  --green:#3ecf8e; --green-bg:rgba(62,207,142,0.1);
  --amber:#f5a623; --amber-bg:rgba(245,166,35,0.1);
  --red:#f87171; --red-bg:rgba(248,113,113,0.1);
  --nav-h:62px;
  --font-head:'Poppins',sans-serif; --font-body:'Inter',sans-serif;
  --ease:cubic-bezier(.4,0,.2,1);
  --radius:12px; --radius-sm:8px; --radius-lg:16px;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
html{scroll-behavior:smooth;}
body{background:var(--bg);color:var(--text);font-family:var(--font-body);font-size:15px;line-height:1.6;overflow-x:hidden;}
::-webkit-scrollbar{width:5px;}
::-webkit-scrollbar-track{background:var(--bg);}
::-webkit-scrollbar-thumb{background:var(--surface2);border-radius:3px;}
a{text-decoration:none;color:inherit;}

/* HEADER */
#th-header{width:100%;max-width:1440px;height:var(--nav-h);display:flex;align-items:center;justify-content:space-between;padding:0 24px;gap:20px;margin:0 auto;}
.th-drawer {position:sticky;top:0;z-index:999;border-bottom: 1px solid rgba(255,255,255,0.06);background:rgba(9,9,15,0.9);backdrop-filter:blur(24px);}
.th-logo{font-family:var(--font-head);font-size:21px;font-weight:800;color:var(--text);white-space:nowrap;flex-shrink:0;letter-spacing:-0.5px;display:flex;align-items:center;gap:7px;}
.th-logo-icon{width:30px;height:30px;background:var(--accent);border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:15px;}
.th-logo em{font-style:normal;color:var(--accent2);}
.th-nav{flex:1;display:flex;align-items:center;gap:2px;overflow-x:auto;scrollbar-width:none;}
.th-nav::-webkit-scrollbar{display:none;}
.th-nav a{font-size:13px;color:var(--text2);padding:6px 11px;border-radius:var(--radius-sm);white-space:nowrap;flex-shrink:0;transition:all .18s;cursor:pointer;}
.th-nav a:hover{color:var(--text);background:var(--surface2);}
.th-nav a.active{color:var(--accent2);background:rgba(108,99,245,0.13);}
.th-actions{display:flex;align-items:center;gap:10px;flex-shrink:0;}
.th-search-btn{width:34px;height:34px;border-radius:var(--radius-sm);border:1px solid var(--border2);background:var(--surface);color:var(--text2);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:15px;transition:all .18s;}
.th-search-btn:hover{background:var(--surface2);color:var(--text);}
.th-pro-btn{font-family:var(--font-head);font-size:12px;font-weight:700;background:var(--accent);color:#fff;border:none;padding:7px 16px;border-radius:20px;cursor:pointer;transition:all .18s;white-space:nowrap;}
.th-pro-btn:hover{background:var(--accent2);transform:translateY(-1px);}
.th-ham{display:none;flex-direction:column;justify-content:center;gap:5px;width:36px;height:36px;border-radius:var(--radius-sm);border:1px solid var(--border2);background:var(--surface);cursor:pointer;padding:8px;transition:background .18s;flex-shrink:0;}
.th-ham:hover{background:var(--surface2);}
.th-ham span{display:block;height:1.5px;background:var(--text2);border-radius:2px;transition:all .3s var(--ease);}
.th-ham.open span:nth-child(1){transform:rotate(45deg) translate(3px,3px);background:var(--text);}
.th-ham.open span:nth-child(2){opacity:0;}
.th-ham.open span:nth-child(3){transform:rotate(-45deg) translate(3px,-3px);background:var(--text);}

/* DRAWER */
#th-drawer-bg{display:none;position:fixed;inset:0;background:rgba(0,0,0,0.65);z-index:1050;backdrop-filter:blur(4px);}
#th-drawer-bg.open{display:block;}
#th-drawer{position:fixed;top:0;left:-290px;width:285px;height:100dvh;background:var(--bg2);border-right:1px solid var(--border2);z-index:1060;transition:left .32s var(--ease);overflow-y:auto;display:flex;flex-direction:column;}
#th-drawer.open{left:0;}
.th-drawer-top{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid var(--border);flex-shrink:0;}
.th-drawer-close{width:30px;height:30px;border-radius:7px;border:1px solid var(--border2);background:var(--surface);color:var(--text2);cursor:pointer;font-size:16px;display:flex;align-items:center;justify-content:center;}
.th-drawer-section-label{font-size:10px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--text3);padding:16px 20px 6px;}
.th-drawer-item{display:flex;align-items:center;gap:12px;padding:11px 20px;font-size:14px;color:var(--text2);cursor:pointer;border-left:2px solid transparent;transition:all .18s;}
.th-drawer-item:hover{color:var(--text);background:var(--surface);}
.th-drawer-item.active{color:var(--accent2);background:rgba(108,99,245,0.08);border-left-color:var(--accent);}
.th-drawer-item .di{font-size:18px;width:26px;text-align:center;flex-shrink:0;}
.th-drawer-item .dc{margin-left:auto;font-size:10px;background:var(--surface2);color:var(--text3);padding:2px 7px;border-radius:10px;}
.th-drawer-pro{margin:16px;background:rgba(108,99,245,0.1);border:1px solid rgba(108,99,245,0.22);border-radius:var(--radius);padding:16px;flex-shrink:0;}
.th-drawer-pro h4{font-family:var(--font-head);font-size:14px;font-weight:700;color:var(--accent2);margin-bottom:4px;}
.th-drawer-pro p{font-size:12px;color:var(--text3);margin-bottom:12px;line-height:1.5;}
.th-drawer-pro button{width:100%;background:var(--accent);color:#fff;border:none;padding:9px;border-radius:8px;font-family:var(--font-head);font-weight:700;font-size:13px;cursor:pointer;}

/* HERO */
.th-hero{padding:52px 24px 36px;text-align:center;position:relative;overflow:hidden;}
.th-hero::before{content:'';position:absolute;top:-80px;left:50%;transform:translateX(-50%);width:500px;height:350px;background:radial-gradient(ellipse,rgba(108,99,245,0.14) 0%,transparent 70%);pointer-events:none;}
.th-hero-tag{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--accent2);background:rgba(108,99,245,0.1);border:1px solid rgba(108,99,245,0.22);padding:5px 13px;border-radius:20px;margin-bottom:18px;}
.th-hero-dot{width:6px;height:6px;background:var(--green);border-radius:50%;animation:thPulse 2s infinite;}
@keyframes thPulse{0%,100%{opacity:1}50%{opacity:.35}}
.th-hero h1{font-family:var(--font-head);font-size:clamp(28px,5vw,50px);font-weight:800;line-height:1.1;margin-bottom:14px;letter-spacing:-1px;}
.th-hero h1 em{font-style:normal;color:var(--accent2);}
.th-hero p{font-size:15px;color:var(--text2);max-width:460px;margin:0 auto 28px;font-weight:300;}
.th-search-wrap{max-width:500px;margin:0 auto;position:relative;}
.th-search-wrap input{width:100%;background:var(--surface);border:1px solid var(--border2);border-radius:14px;padding:13px 118px 13px 18px;font-size:14px;font-family:var(--font-body);color:var(--text);outline:none;transition:border-color .2s;}
.th-search-wrap input::placeholder{color:var(--text3);}
.th-search-wrap input:focus{border-color:var(--accent);}
.th-search-wrap button{position:absolute;right:5px;top:50%;transform:translateY(-50%);background:var(--accent);color:#fff;border:none;padding:8px 16px;border-radius:10px;font-size:13px;font-family:var(--font-body);font-weight:500;cursor:pointer;transition:background .2s;}
.th-search-wrap button:hover{background:var(--accent2);}

/* STATS */
.th-stats{display:flex;justify-content:center;border-top:1px solid var(--border);border-bottom:1px solid var(--border);background:var(--bg2);flex-wrap:wrap;}
.th-stat{padding:14px 28px;text-align:center;border-right:1px solid var(--border);}
.th-stat:last-child{border-right:none;}
.th-stat-num{font-family:var(--font-head);font-size:20px;font-weight:700;}
.th-stat-label{font-size:11px;color:var(--text3);}

/* LAYOUT */
.th-layout{display:flex;}
.th-sidebar{width:190px;flex-shrink:0;background:var(--bg2);border-right:1px solid var(--border);padding:18px 0;position:sticky;top:var(--nav-h);height:calc(100vh - var(--nav-h));overflow-y:auto;}
.th-sidebar-label{font-size:10px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--text3);padding:0 14px 8px;}
.th-sidebar-item{display:flex;align-items:center;gap:9px;padding:9px 14px;font-size:13px;color:var(--text2);cursor:pointer;transition:all .18s;border-left:2px solid transparent;}
.th-sidebar-item:hover{color:var(--text);background:var(--surface);}
.th-sidebar-item.active{color:var(--accent2);background:rgba(108,99,245,0.08);border-left-color:var(--accent);}
.th-sidebar-item .icon{font-size:15px;width:20px;text-align:center;}
.th-sidebar-count{margin-left:auto;font-size:10px;background:var(--surface2);color:var(--text3);padding:2px 6px;border-radius:10px;}
.th-content{flex:1;padding:24px 20px;min-width:0;background:var(--bg);}

/* SECTION HEADS */
.th-section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;}
.th-section-head h2{font-family:var(--font-head);font-size:15px;font-weight:700;display:flex;align-items:center;gap:8px;}
.th-badge{font-size:10px;font-weight:600;padding:2px 8px;border-radius:20px;}
.th-badge-hot{background:var(--red-bg);color:var(--red);}
.th-badge-new{background:var(--green-bg);color:var(--green);}
.th-see-all{font-size:12px;color:var(--accent2);cursor:pointer;}
.th-see-all:hover{text-decoration:underline;}

/* CATEGORY CARDS */
.th-cat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;margin-bottom:28px;}
.th-cat-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:18px 14px;cursor:pointer;transition:all .22s;text-align:center;}
.th-cat-card:hover{transform:translateY(-3px);border-color:var(--border2);background:var(--surface2);}
.th-cat-icon{font-size:26px;margin-bottom:8px;display:block;}
.th-cat-card h3{font-family:var(--font-head);font-size:12px;font-weight:700;margin-bottom:2px;}
.th-cat-card p{font-size:11px;color:var(--text3);}

/* TOOL CARDS */
.th-tools-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(195px,1fr));gap:10px;margin-bottom:28px;}
.th-tool-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:14px;cursor:pointer;transition:all .2s;position:relative;}
.th-tool-card:hover{border-color:var(--border2);transform:translateY(-2px);background:var(--surface2);}

/* ★ COMING SOON CARD — greyed, no hover lift */
.th-cs-card{opacity:0.55;cursor:default;}
.th-cs-card:hover{transform:none !important;background:var(--surface) !important;border-color:var(--border) !important;}
.th-cs-card .th-tool-icon{filter:grayscale(40%);}

.th-tool-card-top{display:flex;align-items:flex-start;gap:11px;margin-bottom:10px;}
.th-tool-icon{width:36px;height:36px;border-radius:9px;display:flex;align-items:center;justify-content:center;font-size:19px;flex-shrink:0;}
.th-tool-info h3{font-family:var(--font-head);font-size:12px;font-weight:600;margin-bottom:2px;line-height:1.3;}
.th-tool-info p{font-size:11px;color:var(--text3);line-height:1.4;}
.th-tool-footer{display:flex;align-items:center;justify-content:space-between;}
.th-tag{font-size:10px;font-weight:500;padding:2px 8px;border-radius:20px;}
.th-tag-free{background:var(--green-bg);color:var(--green);}
.th-tag-pro{background:var(--amber-bg);color:var(--amber);}
.th-tag-soon{background:rgba(82,82,106,0.25);color:var(--text3);}
.th-tool-uses{font-size:10px;color:var(--text3);}
.th-pro-lock{position:absolute;top:10px;right:10px;font-size:12px;opacity:.5;}

/* CATEGORY PAGE */
.th-cat-hero{padding:28px 24px 20px;border-bottom:1px solid var(--border);position:relative;overflow:hidden;}
.th-cat-hero > *{max-width:1360px;margin-left:auto;margin-right:auto;}
.th-cat-hero h1{font-family:var(--font-head);font-size:clamp(20px,4vw,28px);font-weight:800;margin-bottom:6px;}
.th-cat-hero p{font-size:13px;color:var(--text2);}
.th-back-btn{display:flex;align-items:center;gap:5px;font-size:13px;color:var(--text2);cursor:pointer;margin-bottom:14px;transition:color .2s;}
.th-back-btn:hover{color:var(--text);}
.th-cat-meta{display:flex;gap:14px;margin-top:12px;flex-wrap:wrap;}
.th-cat-meta-item{font-size:12px;color:var(--text3);}
.th-cat-meta-item span{color:var(--text2);}
.th-filter-bar{padding:14px 20px;border-bottom:1px solid var(--border);background:var(--bg2);}
.th-filter-bar-inner{max-width:1360px;margin:0 auto;display:flex;gap:7px;flex-wrap:wrap;}
.th-filter-btn{font-size:12px;padding:5px 13px;border-radius:20px;border:1px solid var(--border2);background:transparent;color:var(--text2);cursor:pointer;transition:all .18s;font-family:var(--font-body);}
.th-filter-btn:hover{background:var(--surface);color:var(--text);}
.th-filter-btn.active{background:var(--accent);border-color:var(--accent);color:#fff;}
.th-cat-body{padding:22px 20px;max-width:1360px;margin:0 auto;}
.th-subcat{margin-bottom:28px;}
.th-subcat h2{font-family:var(--font-head);font-size:13px;font-weight:600;color:var(--text2);margin-bottom:12px;display:flex;align-items:center;gap:8px;}
.th-subcat h2::after{content:'';flex:1;height:1px;background:var(--border);}

/* TOOL PAGE */
.th-tool-page{max-width:1140px;margin:0 auto;padding:40px;}
.th-tool-page-header{margin-bottom:28px;}
.th-tool-page-icon{width:56px;height:56px;border-radius:14px;display:flex;align-items:center;justify-content:center;font-size:28px;margin-bottom:16px;}
.th-tool-page h1{font-family:popins;font-size:clamp(22px,4vw,30px);font-weight:800;margin-bottom:8px;letter-spacing:-0.5px;}
.th-tool-page-desc{font-size:15px;color:var(--text2);margin-bottom:16px;line-height:1.6;}
.th-tool-page-tags{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:24px;}
.th-tool-workspace{background:var(--surface);border:1px solid var(--border2);border-radius:var(--radius-lg);padding:24px;margin-bottom:24px;}
.th-tool-workspace label{font-size:12px;color:var(--text3);display:block;margin-bottom:7px;font-weight:500;}
.th-tool-workspace input,.th-tool-workspace textarea,.th-tool-workspace select{width:100%;background:var(--bg);border:1px solid var(--border2);border-radius:var(--radius-sm);padding:11px 14px;font-size:14px;font-family:var(--font-body);color:var(--text);outline:none;margin-bottom:12px;transition:border-color .2s;}
.th-tool-workspace input:focus,.th-tool-workspace textarea:focus{border-color:var(--accent);}
.th-tool-workspace textarea{resize:vertical;min-height:100px;}
.th-btn-primary{background:var(--accent);color:#fff;border:none;padding:11px 24px;border-radius:10px;font-family:var(--font-head);font-weight:700;font-size:14px;cursor:pointer;transition:background .2s;}
.th-btn-primary:hover{background:var(--accent2);}
.th-btn-secondary{background:var(--surface2);color:var(--text2);border:1px solid var(--border2);padding:10px 18px;border-radius:10px;font-size:13px;cursor:pointer;transition:all .2s;}
.th-btn-secondary:hover{color:var(--text);}
.th-tool-output{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);padding:14px;margin-top:12px;font-size:13px;color:var(--text2);white-space:pre-wrap;word-break:break-all;line-height:1.65;display:none;}
.th-tool-output.show{display:block;}
.th-copy-btn{font-size:11px;color:var(--text3);background:var(--surface);border:1px solid var(--border2);padding:4px 12px;border-radius:6px;cursor:pointer;margin-top:8px;display:none;}
.th-copy-btn.show{display:inline-block;}

/* COMING SOON PAGE */
.th-cs-page{min-height:calc(100vh - var(--nav-h));display:flex;align-items:center;justify-content:center;padding:40px 20px;}
.th-cs-box{text-align:center;max-width:420px;}
.th-cs-icon{font-size:52px;margin-bottom:20px;}
.th-cs-box h1{font-family:var(--font-head);font-size:26px;font-weight:800;margin-bottom:10px;}
.th-cs-box p{font-size:14px;color:var(--text2);margin-bottom:24px;line-height:1.65;}

/* TOAST */
.th-toast{position:fixed;bottom:20px;right:20px;background:var(--surface2);border:1px solid var(--border2);color:var(--text);padding:11px 18px;border-radius:10px;font-size:13px;z-index:9999;opacity:0;transform:translateY(10px);transition:all .28s;pointer-events:none;max-width:300px;}
.th-toast.show{opacity:1;transform:translateY(0);}

/* ── PRO CARD STYLES ─────────────────────────────────────── */
.th-pro-card {
  border-color: rgba(108,99,245,0.3) !important;
  position: relative;
  overflow: hidden;
}
.th-pro-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(108,99,245,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.th-pro-card:hover {
  border-color: rgba(108,99,245,0.55) !important;
  box-shadow: 0 0 20px rgba(108,99,245,0.15);
}
.th-pro-ribbon {
  position: absolute;
  top: 0; right: 0;
  background: linear-gradient(135deg, #6c63f5, #9d96ff);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-head);
  padding: 3px 8px;
  border-bottom-left-radius: 8px;
  letter-spacing: .05em;
}

/* RESPONSIVE */
@media(max-width:900px){
  .th-nav{display:none;}
  .th-ham{display:flex;}
  .th-sidebar{display:none;}
  .th-layout{display:block;}
  .th-content{padding:16px 14px;}
  .th-hero{padding:36px 16px 24px;}
  .th-stat{padding:10px 16px;}
}
@media(max-width:480px){
  #th-header{gap:12px;}
  .th-logo{font-size:18px;}
  .th-pro-btn{padding:6px 12px;font-size:11px;}
  .th-cat-grid{grid-template-columns:repeat(2,1fr);}
  .th-cat-card{padding:12px 6px;}
  .th-cat-icon{font-size:20px;}
  .th-cat-card p{display:none;}
  .th-tools-grid{grid-template-columns:1fr 1fr;}
}

/* ── ACCOUNT AREA (header login/Pro badge) ──────────────────── */
.th-account-area{display:flex;align-items:center;}
.th-account-skeleton{width:92px;height:34px;border-radius:20px;background:linear-gradient(90deg,var(--surface) 25%,var(--surface2) 50%,var(--surface) 75%);background-size:200% 100%;animation:thShimmer 1.4s infinite;}
@keyframes thShimmer{0%{background-position:200% 0;}100%{background-position:-200% 0;}}

.th-account-wrap{position:relative;}
.th-account-btn{display:flex;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--border2);padding:5px 12px 5px 6px;border-radius:24px;cursor:pointer;transition:all .2s var(--ease);font-family:var(--font-body);animation:thFadeIn .35s var(--ease);}
.th-account-btn:hover{background:var(--surface2);border-color:rgba(108,99,245,0.4);}
@keyframes thFadeIn{from{opacity:0;transform:translateY(-4px);}to{opacity:1;transform:translateY(0);}}

.th-account-avatar{width:26px;height:26px;border-radius:50%;background:linear-gradient(135deg,var(--accent),var(--accent2));color:#fff;font-family:var(--font-head);font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.th-account-avatar.lg{width:38px;height:38px;font-size:15px;}

.th-account-name{font-size:13px;color:var(--text);max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.th-account-caret{font-size:10px;color:var(--text3);transition:transform .2s var(--ease);}
.th-account-wrap.open .th-account-caret{transform:rotate(180deg);}

.th-account-badge{font-size:10px;font-weight:700;padding:2px 8px;border-radius:20px;font-family:var(--font-head);letter-spacing:.02em;}
.th-acct-badge-pro{background:linear-gradient(135deg,rgba(108,99,245,0.22),rgba(157,150,255,0.22));color:var(--accent2);border:1px solid rgba(108,99,245,0.4);}
.th-acct-badge-free{background:var(--surface2);color:var(--text3);}
.th-acct-badge-admin{background:linear-gradient(135deg,rgba(245,166,35,0.22),rgba(255,210,120,0.22));color:var(--amber);border:1px solid rgba(245,166,35,0.45);animation:thAdminGlow 2.4s ease-in-out infinite;}
@keyframes thAdminGlow{0%,100%{box-shadow:0 0 0 0 rgba(245,166,35,0.25);}50%{box-shadow:0 0 0 5px rgba(245,166,35,0);}}

.th-account-menu{position:absolute;top:calc(100% + 10px);right:0;width:240px;background:var(--bg2);border:1px solid var(--border2);border-radius:var(--radius);box-shadow:0 12px 32px rgba(0,0,0,0.4);opacity:0;visibility:hidden;transform:translateY(-8px) scale(.97);transition:all .2s var(--ease);z-index:1200;overflow:hidden;}
.th-account-wrap.open .th-account-menu{opacity:1;visibility:visible;transform:translateY(0) scale(1);}

.th-account-menu-head{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--border);}
.th-account-menu-name{font-size:13px;font-weight:600;color:var(--text);}
.th-account-menu-email{font-size:11px;color:var(--text3);max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}

.th-account-menu-status{font-size:11px;padding:9px 16px;border-bottom:1px solid var(--border);font-weight:600;}

.th-account-menu-upgrade{display:block;width:calc(100% - 24px);margin:10px 12px;background:var(--accent);color:#fff;border:none;padding:9px;border-radius:8px;font-family:var(--font-head);font-weight:700;font-size:12px;cursor:pointer;transition:background .2s;}
.th-account-menu-upgrade:hover{background:var(--accent2);}

.th-account-menu-item{display:flex;align-items:center;gap:8px;padding:11px 16px;font-size:13px;color:var(--text2);transition:all .18s;cursor:pointer;}
.th-account-menu-item:hover{background:var(--surface);color:var(--text);}

/* ── AUTH PAGES (login/signup/forgot/reset) ─────────────────── */
.th-auth-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;position:relative;overflow:hidden;background:var(--bg);}
.th-auth-page::before{content:'';position:absolute;top:-120px;left:50%;transform:translateX(-50%);width:600px;height:420px;background:radial-gradient(ellipse,rgba(108,99,245,0.16) 0%,transparent 70%);pointer-events:none;animation:thAuthGlow 6s ease-in-out infinite;}
@keyframes thAuthGlow{0%,100%{opacity:.7;transform:translateX(-50%) scale(1);}50%{opacity:1;transform:translateX(-50%) scale(1.08);}}

.th-auth-card{position:relative;z-index:1;background:var(--surface);border:1px solid var(--border2);border-radius:var(--radius-lg);padding:38px 34px;width:100%;max-width:400px;animation:thAuthSlideUp .45s var(--ease);box-shadow:0 20px 60px rgba(0,0,0,0.35);}
@keyframes thAuthSlideUp{from{opacity:0;transform:translateY(18px);}to{opacity:1;transform:translateY(0);}}

.th-auth-logo{display:flex;align-items:center;gap:7px;justify-content:center;margin-bottom:22px;font-family:var(--font-head);font-size:21px;font-weight:800;color:var(--text);}
.th-auth-logo .th-logo-icon{width:30px;height:30px;background:var(--accent);border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:15px;animation:thIconPulse 2.4s ease-in-out infinite;}
@keyframes thIconPulse{0%,100%{box-shadow:0 0 0 0 rgba(108,99,245,0.5);}50%{box-shadow:0 0 0 8px rgba(108,99,245,0);}}
.th-auth-logo em{font-style:normal;color:var(--accent2);}

.th-auth-card h2{font-family:var(--font-head);font-size:21px;font-weight:800;text-align:center;margin-bottom:6px;letter-spacing:-0.4px;}
.th-auth-sub{font-size:13px;color:var(--text2);text-align:center;margin-bottom:24px;}

.th-auth-field{margin-bottom:16px;animation:thFieldIn .4s var(--ease) backwards;}
.th-auth-field:nth-child(1){animation-delay:.05s;}
.th-auth-field:nth-child(2){animation-delay:.1s;}
.th-auth-field:nth-child(3){animation-delay:.15s;}
.th-auth-field:nth-child(4){animation-delay:.2s;}
@keyframes thFieldIn{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:translateY(0);}}

.th-auth-field label{display:block;font-size:12px;color:var(--text3);margin-bottom:6px;font-weight:500;}
.th-auth-field input{width:100%;background:var(--bg);border:1px solid var(--border2);border-radius:var(--radius-sm);padding:11px 14px;font-size:14px;font-family:var(--font-body);color:var(--text);outline:none;transition:border-color .2s,box-shadow .2s;box-sizing:border-box;}
.th-auth-field input::placeholder{color:var(--text3);}
.th-auth-field input:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(108,99,245,0.14);}

.th-auth-btn{width:100%;background:var(--accent);color:#fff;border:none;padding:12px;border-radius:var(--radius-sm);font-family:var(--font-head);font-weight:700;font-size:14px;cursor:pointer;transition:all .2s;margin-top:6px;}
.th-auth-btn:hover{background:var(--accent2);transform:translateY(-1px);}
.th-auth-btn:active{transform:translateY(0);}

.th-auth-alert{padding:11px 14px;border-radius:var(--radius-sm);font-size:13px;margin-bottom:16px;animation:thFieldIn .3s var(--ease);display:flex;align-items:flex-start;gap:8px;line-height:1.5;}
.th-auth-alert.error{background:var(--red-bg);color:var(--red);border:1px solid rgba(248,113,113,0.25);}
.th-auth-alert.success{background:var(--green-bg);color:var(--green);border:1px solid rgba(62,207,142,0.25);}
.th-auth-alert.info{background:rgba(108,99,245,0.1);color:var(--accent2);border:1px solid rgba(108,99,245,0.22);}
.th-auth-alert.warn{background:var(--amber-bg);color:var(--amber);border:1px solid rgba(245,166,35,0.25);}

.th-auth-debug{background:var(--bg2);border:1px dashed var(--border2);color:var(--text3);padding:10px 12px;border-radius:var(--radius-sm);font-size:12px;word-break:break-all;margin-top:14px;line-height:1.6;}
.th-auth-debug a{color:var(--accent2);}

.th-auth-switch{text-align:center;margin-top:20px;font-size:13px;color:var(--text2);}
.th-auth-switch a{color:var(--accent2);font-weight:500;}
.th-auth-switch a:hover{text-decoration:underline;}

.th-auth-back{position:relative;z-index:1;display:flex;align-items:center;gap:6px;color:var(--text2);font-size:13px;margin-bottom:18px;justify-content:center;}
.th-auth-back a{color:var(--text2);transition:color .2s;}
.th-auth-back a:hover{color:var(--text);}

/* ── Filter buttons (Admin Panel) ───────────────── */
.th-filter-btn{display:inline-block;padding:7px 16px;border-radius:20px;font-size:12px;font-weight:600;font-family:var(--font-head);color:var(--text2);background:var(--surface);border:1px solid var(--border2);transition:all .18s;cursor:pointer;}
.th-filter-btn:hover{color:var(--text);border-color:var(--border2);}
.th-filter-btn.active{background:var(--accent);color:#fff;border-color:var(--accent);}

/* ── HEADER ACCOUNT AREA — RESPONSIVE ───────────────────── */
/* On small screens: hide name+badge inside button, show only avatar */
@media(max-width:640px){
  .th-account-name,.th-account-badge,.th-account-caret{display:none;}
  .th-account-btn{padding:4px;border-radius:50%;background:var(--surface);}
  /* Keep dropdown full-width on mobile */
  .th-account-menu{right:-8px;width:calc(100vw - 32px);max-width:300px;}
}
/* On medium screens: shorten name max-width */
@media(max-width:900px) and (min-width:641px){
  .th-account-name{max-width:60px;}
  .th-account-badge{font-size:9px;padding:2px 6px;}
}

/* ── ADMIN PANEL — RESPONSIVE ───────────────────────────── */
@media(max-width:900px){
  /* Show hamburger, hide sidebar */
  .adm-sidebar{
    position:fixed;top:0;left:-250px;z-index:2000;height:100vh;
    transition:left .28s cubic-bezier(.4,0,.2,1);box-shadow:4px 0 24px rgba(0,0,0,.4);
  }
  .adm-sidebar.open{left:0;}
  .adm-main{padding:16px;}
  /* Mobile top bar inside admin */
  .adm-mobile-bar{display:flex;align-items:center;justify-content:space-between;
    background:var(--bg2);border-bottom:1px solid var(--border2);
    padding:12px 16px;margin:-16px -16px 20px;position:sticky;top:0;z-index:100;}
  .adm-mobile-bar h2{font-family:var(--font-head);font-size:15px;font-weight:800;}
  .adm-ham-btn{background:none;border:none;cursor:pointer;color:var(--text);font-size:22px;padding:4px;}
  .adm-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:1999;}
  .adm-overlay.show{display:block;}
  /* Stat cards — 2 col on mobile */
  .adm-stats-grid{grid-template-columns:1fr 1fr;}
  /* Tables — horizontal scroll already handled */
  .adm-topbar{flex-direction:column;align-items:flex-start;gap:10px;}
}
@media(min-width:901px){
  .adm-mobile-bar{display:none;}
}

/* ── DASHBOARD — RESPONSIVE ─────────────────────────────── */
@media(max-width:600px){
  .dash-hero{flex-direction:column;align-items:flex-start;}
  .dash-upgrade-btn{width:100%;text-align:center;}
  .dash-sub-grid{grid-template-columns:1fr 1fr;}
}
