@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');
:root{--primary:263 90% 63%;--bg:#0f1117;--card:#161b2a;--border:#1e2a3a;--text:#e2e8f0;--muted:#64748b;--radius:0.5rem;--purple:hsl(263,90%,63%);--purple-dim:hsla(263,90%,63%,.15);--purple-border:hsla(263,90%,63%,.3);--danger:#ef4444;--success:#22c55e;--warning:#f59e0b}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{font-family:'Inter',sans-serif;background:var(--bg);color:var(--text);min-height:100vh;line-height:1.6;-webkit-font-smoothing:antialiased}
a{color:var(--purple);text-decoration:none}a:hover{text-decoration:underline}
img{max-width:100%}
/* Layout */
.container{max-width:1200px;margin:0 auto;padding:0 1.5rem}
.container-sm{max-width:480px;margin:0 auto;padding:0 1.5rem}
.container-md{max-width:780px;margin:0 auto;padding:0 1.5rem}
/* Navbar */
.navbar{position:sticky;top:0;z-index:100;background:rgba(15,17,23,.85);backdrop-filter:blur(12px);border-bottom:1px solid var(--border);padding:.875rem 0}
.navbar-inner{display:flex;align-items:center;justify-content:space-between;gap:1rem;max-width:1200px;margin:0 auto;padding:0 1.5rem}
.navbar-brand{display:flex;align-items:center;gap:.5rem;font-weight:700;font-size:1.1rem;color:var(--text);text-decoration:none}
.brand-icon{width:32px;height:32px;background:var(--purple);border-radius:8px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.brand-icon svg{width:16px;height:16px;color:#fff;fill:none;stroke:currentColor;stroke-width:2.5}
.navbar-nav{display:flex;align-items:center;gap:.25rem}
.nav-link{padding:.45rem .85rem;border-radius:var(--radius);color:var(--muted);font-size:.875rem;font-weight:500;transition:all .2s}
.nav-link:hover{color:var(--text);background:rgba(255,255,255,.06);text-decoration:none}
.nav-link.active{color:var(--text)}
/* Buttons */
.btn{display:inline-flex;align-items:center;gap:.4rem;padding:.55rem 1.1rem;border-radius:var(--radius);font-size:.875rem;font-weight:600;cursor:pointer;border:none;transition:all .2s;text-decoration:none;line-height:1}
.btn:hover{text-decoration:none}
.btn-primary{background:var(--purple);color:#fff}
.btn-primary:hover{opacity:.9;color:#fff}
.btn-outline{background:transparent;color:var(--text);border:1px solid var(--border)}
.btn-outline:hover{background:rgba(255,255,255,.05);color:var(--text)}
.btn-ghost{background:transparent;color:var(--muted);border:none}
.btn-ghost:hover{background:rgba(255,255,255,.05);color:var(--text)}
.btn-danger{background:#ef444420;color:var(--danger);border:1px solid #ef444440}
.btn-danger:hover{background:#ef444430}
.btn-sm{padding:.35rem .75rem;font-size:.8rem}
.btn-lg{padding:.75rem 1.5rem;font-size:1rem}
.btn-icon{padding:.45rem;width:2rem;height:2rem;justify-content:center}
.btn:disabled{opacity:.5;cursor:not-allowed}
/* Cards */
.card{background:var(--card);border:1px solid var(--border);border-radius:.75rem}
.card-body{padding:1.25rem}
/* Forms */
.form-group{margin-bottom:1rem}
.form-label{display:block;font-size:.8rem;font-weight:500;color:var(--muted);margin-bottom:.4rem}
.form-control{width:100%;padding:.6rem .9rem;background:#0d1117;border:1px solid var(--border);border-radius:var(--radius);color:var(--text);font-size:.875rem;font-family:inherit;transition:border-color .2s}
.form-control:focus{outline:none;border-color:var(--purple);box-shadow:0 0 0 3px var(--purple-dim)}
.form-control::placeholder{color:var(--muted)}
.form-error{font-size:.78rem;color:var(--danger);margin-top:.3rem}
.input-group{display:flex;gap:.5rem}
.input-group .form-control{flex:1}
/* Badges */
.badge{display:inline-flex;align-items:center;padding:.2rem .55rem;border-radius:20px;font-size:.7rem;font-weight:600}
.badge-active{background:#22c55e20;color:#22c55e;border:1px solid #22c55e40}
.badge-inactive{background:#64748b20;color:#64748b;border:1px solid #64748b40}
.badge-flagged{background:#ef444420;color:#ef4444;border:1px solid #ef444440}
.badge-purple{background:var(--purple-dim);color:var(--purple);border:1px solid var(--purple-border)}
/* Hero */
.hero{padding:5rem 0 4rem;text-align:center}
.hero-badge{display:inline-flex;align-items:center;gap:.4rem;background:var(--purple-dim);color:var(--purple);border:1px solid var(--purple-border);border-radius:20px;padding:.35rem .85rem;font-size:.75rem;font-weight:600;margin-bottom:1.5rem}
.hero h1{font-size:clamp(2.2rem,5vw,3.5rem);font-weight:800;line-height:1.15;letter-spacing:-.03em;margin-bottom:1rem}
.hero h1 span{color:var(--purple)}
.hero-sub{font-size:1.1rem;color:var(--muted);max-width:520px;margin:0 auto 2.5rem}
/* Shorten Box */
.shorten-box{background:var(--card);border:1px solid var(--border);border-radius:1rem;padding:1.5rem;max-width:680px;margin:0 auto}
.result-box{margin-top:1rem;padding:1rem;background:var(--purple-dim);border:1px solid var(--purple-border);border-radius:.75rem;display:flex;align-items:center;justify-content:space-between;gap:1rem}
.result-url{font-family:'JetBrains Mono',monospace;font-size:.85rem;color:var(--purple);font-weight:500}
/* Features */
.features{padding:4rem 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border);background:#0d1117}
.features-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1.25rem;margin-top:2.5rem;max-width:860px;margin-left:auto;margin-right:auto}
.feature-card{padding:1.25rem;background:var(--card);border:1px solid var(--border);border-radius:.75rem;transition:border-color .2s}
.feature-card:hover{border-color:var(--purple-border)}
.feature-icon{width:36px;height:36px;background:var(--purple-dim);border-radius:.5rem;display:flex;align-items:center;justify-content:center;margin-bottom:.875rem}
.feature-icon svg{width:18px;height:18px;color:var(--purple);stroke:currentColor;fill:none;stroke-width:2}
.feature-card h3{font-size:.9rem;font-weight:600;margin-bottom:.4rem}
.feature-card p{font-size:.8rem;color:var(--muted);line-height:1.6}
/* CTA */
.cta-section{padding:4rem 0;text-align:center}
.cta-section h2{font-size:2rem;font-weight:800;letter-spacing:-.02em;margin-bottom:.875rem}
.cta-section p{color:var(--muted);margin-bottom:2rem}
.btn-group{display:flex;gap:.75rem;justify-content:center;flex-wrap:wrap}
/* Footer */
footer{border-top:1px solid var(--border);padding:2rem 0}
.footer-inner{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1rem}
.footer-links{display:flex;flex-wrap:wrap;gap:1.25rem}
.footer-links a{font-size:.8rem;color:var(--muted);transition:color .2s}
.footer-links a:hover{color:var(--text);text-decoration:none}
.footer-copy{font-size:.8rem;color:var(--muted)}
/* Dashboard Layout */
.app-layout{display:flex;min-height:100vh}
.sidebar{width:240px;flex-shrink:0;background:#0a0d14;border-right:1px solid var(--border);display:flex;flex-direction:column;position:sticky;top:0;height:100vh}
.sidebar-header{padding:1.25rem 1rem;border-bottom:1px solid var(--border)}
.sidebar-nav{flex:1;padding:1rem .75rem;overflow-y:auto}
.sidebar-item{display:flex;align-items:center;gap:.6rem;padding:.55rem .75rem;border-radius:var(--radius);color:var(--muted);font-size:.875rem;font-weight:500;transition:all .2s;text-decoration:none;margin-bottom:.125rem}
.sidebar-item:hover{background:rgba(255,255,255,.05);color:var(--text);text-decoration:none}
.sidebar-item.active{background:var(--purple-dim);color:var(--purple)}
.sidebar-item svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;flex-shrink:0}
.sidebar-footer{padding:1rem;border-top:1px solid var(--border)}
.app-main{flex:1;overflow-x:hidden;min-width:0}
.page-content{max-width:960px;margin:0 auto;padding:1.5rem}
/* Stats */
.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:1rem;margin-bottom:1.5rem}
.stat-card{padding:1.1rem;display:flex;flex-direction:column;gap:.75rem}
.stat-label{font-size:.75rem;font-weight:500;color:var(--muted)}
.stat-value{font-size:1.75rem;font-weight:700;line-height:1}
.stat-icon{color:var(--purple)}
.stat-row{display:flex;align-items:center;justify-content:space-between}
/* URL Table */
.url-list{border-radius:.75rem;border:1px solid var(--border);position:relative}
.url-row{display:flex;align-items:center;gap:1rem;padding:.875rem 1.25rem;border-bottom:1px solid var(--border);transition:background .15s;position:relative}
.url-row:last-child{border-bottom:none}
.url-row:first-child{border-radius:.75rem .75rem 0 0}
.url-row:last-child{border-radius:0 0 .75rem .75rem}
.url-row:only-child{border-radius:.75rem}
.url-row:hover{background:rgba(255,255,255,.03)}
.url-info{flex:1;min-width:0}
.url-code{font-family:'JetBrains Mono',monospace;font-size:.85rem;font-weight:600;color:var(--purple)}
.url-original{font-size:.78rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:380px}
.url-meta{display:flex;align-items:center;gap:.5rem;font-size:.75rem;color:var(--muted);white-space:nowrap}
.url-actions{display:flex;align-items:center;gap:.25rem}
/* Quick Create */
.quick-create{padding:1rem 1.25rem;border-radius:.75rem;margin-bottom:1.5rem;display:flex;align-items:center;gap:.75rem}
.quick-create svg{color:var(--muted);flex-shrink:0}
.quick-create .form-control{border:none;background:transparent;padding:.4rem 0;font-size:.9rem}
.quick-create .form-control:focus{box-shadow:none}
/* Search */
.search-wrapper{position:relative}
.search-wrapper svg{position:absolute;left:.75rem;top:50%;transform:translateY(-50%);color:var(--muted);width:14px;height:14px;pointer-events:none}
.search-wrapper .form-control{padding-left:2.25rem}
/* Toolbar */
.toolbar{display:flex;gap:.75rem;margin-bottom:1.25rem;flex-wrap:wrap}
.toolbar form{flex:1;display:flex;gap:.5rem;min-width:200px}
.toolbar form .form-control{flex:1}
/* Pagination */
.pagination{display:flex;align-items:center;gap:.5rem;padding:.875rem 1.25rem;border-top:1px solid var(--border)}
.page-info{font-size:.78rem;color:var(--muted);flex:1}
/* Modal */
.modal-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.7);z-index:200;align-items:center;justify-content:center}
.modal-overlay.open{display:flex}
.modal{background:var(--card);border:1px solid var(--border);border-radius:1rem;padding:1.5rem;width:100%;max-width:360px;position:relative}
.modal-title{font-size:1rem;font-weight:700;margin-bottom:.25rem}
.modal-desc{font-size:.8rem;color:var(--muted);margin-bottom:1.25rem}
.modal-close{position:absolute;top:1rem;right:1rem}
/* Dropdown */
.dropdown{position:static}
.dropdown-trigger-wrap{position:relative}
.dropdown-menu{display:none;position:fixed;background:var(--card);border:1px solid var(--border);border-radius:.625rem;padding:.35rem;min-width:168px;z-index:9999;box-shadow:0 8px 32px rgba(0,0,0,.7)}
.dropdown.open .dropdown-menu{display:block}
.dropdown-item{display:flex;align-items:center;gap:.5rem;padding:.45rem .75rem;border-radius:calc(var(--radius) - 2px);font-size:.82rem;color:var(--text);cursor:pointer;transition:background .15s;border:none;background:none;width:100%;text-align:left}
.dropdown-item:hover{background:rgba(255,255,255,.06)}
.dropdown-item.danger{color:var(--danger)}
.dropdown-item svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;flex-shrink:0}
.dropdown-sep{height:1px;background:var(--border);margin:.3rem 0}
/* Toast */
.toast-container{position:fixed;bottom:1.5rem;right:1.5rem;z-index:500;display:flex;flex-direction:column;gap:.5rem}
.toast{padding:.75rem 1.1rem;border-radius:.625rem;font-size:.85rem;font-weight:500;display:flex;align-items:center;gap:.75rem;animation:slideIn .3s ease;box-shadow:0 4px 16px rgba(0,0,0,.5);min-width:220px}
.toast-success{background:#16232d;border:1px solid #22c55e50;color:var(--success)}
.toast-error{background:#1f1218;border:1px solid #ef444450;color:var(--danger)}
.toast-info{background:#0f1827;border:1px solid var(--purple-border);color:var(--purple)}
@keyframes slideIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
/* Topbar (mobile) */
.topbar{display:none;align-items:center;justify-content:space-between;padding:.875rem 1rem;border-bottom:1px solid var(--border);background:#0a0d14}
/* Charts */
.chart-box{padding:1.25rem;margin-bottom:1.25rem}
.chart-title{font-size:.85rem;font-weight:600;margin-bottom:1rem}
#clicksChart{width:100%;height:200px}
/* Auth */
.auth-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem}
.auth-card{width:100%;max-width:400px}
.auth-header{text-align:center;margin-bottom:2rem}
.auth-logo{display:inline-flex;align-items:center;gap:.5rem;margin-bottom:1.25rem;text-decoration:none}
.auth-header h1{font-size:1.5rem;font-weight:700;letter-spacing:-.02em;margin-bottom:.25rem}
.auth-header p{font-size:.875rem;color:var(--muted)}
/* Page Title */
.page-header{margin-bottom:1.5rem;display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}
.page-title{font-size:1.5rem;font-weight:700;letter-spacing:-.02em}
.page-subtitle{font-size:.8rem;color:var(--muted);margin-top:.125rem}
/* Empty state */
.empty-state{text-align:center;padding:3rem 1rem}
.empty-icon{width:48px;height:48px;color:var(--muted);opacity:.4;margin:0 auto 1rem}
.empty-state h3{font-size:.95rem;font-weight:600;margin-bottom:.35rem}
.empty-state p{font-size:.82rem;color:var(--muted)}
/* Section Heading */
.section-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem}
.section-heading h2{font-size:.9rem;font-weight:600}
/* Two col grid */
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:1.25rem}
/* Analytics */
.analytics-stat{display:flex;align-items:center;gap:1rem;padding:1.25rem}
.analytics-stat-icon{width:48px;height:48px;background:var(--purple-dim);border-radius:.75rem;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.analytics-stat-icon svg{color:var(--purple);width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:2}
/* Referers List */
.referer-row{display:flex;align-items:center;gap:.75rem;margin-bottom:.625rem}
.referer-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.referer-label{flex:1;font-size:.8rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.referer-count{font-size:.8rem;font-weight:600}
/* QR */
.qr-img{width:200px;height:200px;border-radius:.75rem;margin:0 auto;display:block;border:1px solid var(--border)}
/* Legal pages */
.legal-page{max-width:720px;margin:4rem auto;padding:0 1.5rem}
.legal-page h1{font-size:2rem;font-weight:800;margin-bottom:.5rem}
.legal-page .lead{color:var(--muted);margin-bottom:2.5rem}
.legal-page h2{font-size:1.1rem;font-weight:700;margin:2rem 0 .75rem}
.legal-page p,.legal-page li{font-size:.9rem;color:var(--muted);line-height:1.75;margin-bottom:.5rem}
.legal-page ul{padding-left:1.5rem}
/* Responsive */
@media(max-width:768px){.topbar{display:flex}.sidebar{display:none;position:fixed;left:0;top:0;height:100vh;z-index:150}.sidebar.open{display:flex}.two-col{grid-template-columns:1fr}.url-original{max-width:180px}.navbar-nav .nav-link span{display:none}.features-grid{grid-template-columns:1fr}}
@media(max-width:480px){.hero h1{font-size:2rem}.shorten-box{padding:1rem}.btn-group{flex-direction:column;align-items:center}}
/* Utility */
.text-primary{color:var(--purple)}.text-muted{color:var(--muted)}.text-success{color:var(--success)}.text-danger{color:var(--danger)}.text-warning{color:var(--warning)}
.mono{font-family:'JetBrains Mono',monospace}
.fw-bold{font-weight:700}.fw-semibold{font-weight:600}
.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}
.flex{display:flex}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}
.hidden{display:none!important}
.spin{animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}
