@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
  --blue-600: #2563eb; --blue-700: #1d4ed8; --blue-50: #eff6ff; --blue-100: #dbeafe;
  --indigo-700: #4338ca; --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb;
  --gray-300: #d1d5db; --gray-400: #9ca3af; --gray-500: #6b7280; --gray-600: #4b5563;
  --gray-700: #374151; --gray-900: #111827; --green-50: #f0fdf4; --green-100: #dcfce7;
  --green-600: #16a34a; --green-700: #15803d; --red-50: #fef2f2; --red-600: #dc2626;
  --purple-50: #faf5ff; --purple-100: #f3e8ff; --purple-600: #9333ea; --rose-100: #ffe4e6;
  --rose-600: #e11d48; --amber-50: #fffbeb; --amber-100: #fef3c7; --amber-600: #d97706;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05); --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1); --radius: 12px;
}

body { font-family: "Gill Sans Extrabold", sans-serif; background: linear-gradient(180deg,#f8fbff 0%, #f5f7fb 48%, #f9fafb 100%); color: var(--gray-900); line-height: 1.6; min-height: 100vh; }

a { text-decoration: none; color: inherit; }

/* LAYOUT */
.layout { display: flex; min-height: 100vh; overflow-x: hidden; }
.sidebar { width: 260px; background: white; border-right: 1px solid var(--gray-200); position: fixed; top: 0; left: 0; height: 100vh; display: flex; flex-direction: column; z-index: 100; transition: transform .3s ease; }
.sidebar-logo { padding: 24px 20px; border-bottom: 1px solid var(--gray-100); }
.sidebar-logo h1 { font-size: 1.4rem; font-weight: 800; background: linear-gradient(135deg, var(--blue-600), var(--indigo-700)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sidebar-logo p { font-size: .75rem; color: var(--gray-400); margin-top: 2px; }
.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.sidebar-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; color: var(--gray-600); font-size: .9rem; font-weight: 500; transition: all .25s ease; position: relative; overflow: hidden; margin-bottom: 4px; }
.sidebar-item::before { content: ''; position: absolute; left: 0; top: 50%; width: 3px; height: 0; background: var(--blue-600); border-radius: 0 4px 4px 0; transform: translateY(-50%); transition: height .3s ease; }
.sidebar-item:hover, .sidebar-item.active { background: var(--blue-50); color: var(--blue-600); transform: translateX(4px); }
.sidebar-item:hover::before, .sidebar-item.active::before { height: 60%; }
.sidebar-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.sidebar-footer { padding: 16px 12px; border-top: 1px solid var(--gray-100); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--gray-50); border-radius: 10px; margin-bottom: 8px; }
.sidebar-user img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.sidebar-user-info p { font-size: .85rem; font-weight: 600; }
.sidebar-user-info span { font-size: .72rem; color: var(--gray-400); }
.main-content { margin-left: 260px; flex: 1; padding: 32px; min-height: 100vh; overflow-x: hidden; }
.main-content > * { max-width: 100%; }

/* TOPBAR */
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.topbar h2 { font-size: 1.5rem; font-weight: 700; }

/* CARDS */
.card { background: linear-gradient(180deg,#ffffff 0%, #fcfdff 100%); border: 1px solid #e8edf6; border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 24px; transition: transform .25s ease, box-shadow .25s ease; position: relative; overflow: hidden; animation: cardFloatIn .55s ease both; }
.card::before { content:''; position:absolute; left:-120%; top:0; width:90%; height:100%; background:linear-gradient(100deg,transparent 0%, rgba(255,255,255,.55) 45%, transparent 100%); transition:left .65s ease; pointer-events:none; }
.card:hover::before { left:120%; }
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 35px -18px rgba(30,64,175,.45); }
.card-grid { display: grid; gap: 20px; }
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* STAT CARDS */
.stat-card { display: flex; align-items: center; justify-content: space-between; }
.stat-card .stat-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.stat-card .stat-icon svg { width: 26px; height: 26px; }
.stat-card .stat-label { font-size: .8rem; font-weight: 600; margin-bottom: 2px; }
.stat-card .stat-value { font-size: 2rem; font-weight: 800; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: 9px; font-size: .9rem; font-weight: 600; cursor: pointer; border: none; transition: all .25s ease; position: relative; overflow: hidden; }
.btn::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,.15); opacity: 0; transition: opacity .2s; }
.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--blue-600); color: white; }
.btn-primary:hover { background: var(--blue-700); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(37,99,235,.4); }
.btn-success { background: var(--green-600); color: white; }
.btn-success:hover { background: var(--green-700); }
.btn-danger { background: var(--red-600); color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost { background: var(--gray-100); color: var(--gray-700); }
.btn-ghost:hover { background: var(--gray-200); }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* INPUTS */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: .85rem; font-weight: 500; color: var(--gray-700); margin-bottom: 6px; }
.input-field { width: 100%; padding: 10px 14px; border: 1.5px solid var(--gray-200); border-radius: 9px; font-size: .9rem; font-family: inherit; background: white; transition: all .25s ease; }
.input-field:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 4px rgba(37,99,235,.1); transform: scale(1.005); }
.input-field:hover:not(:focus) { border-color: var(--gray-300); }
.input-icon-wrap { position: relative; }
.input-icon-wrap .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-400); width: 18px; height: 18px; }
.input-icon-wrap .input-field { padding-left: 40px; }
textarea.input-field { resize: vertical; }

/* ALERTS */
.alert { padding: 14px 16px; border-radius: 10px; font-size: .88rem; margin-bottom: 16px; display: flex; align-items: flex-start; gap: 10px; }
.alert-error { background: var(--red-50); color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: var(--green-50); color: #166534; border: 1px solid #86efac; }
.alert-warning { background: var(--amber-50); color: #92400e; border: 1px solid #fcd34d; }
.alert-info { background: var(--blue-50); color: #1e40af; border: 1px solid #93c5fd; }

/* BADGE */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge-pending { background: var(--amber-100); color: #92400e; }
.badge-accepted { background: var(--green-100); color: #166534; }
.badge-rejected { background: var(--red-50); color: #991b1b; }
.badge-admin { background: var(--purple-100); color: #6b21a8; }

/* TABS */
.tabs { display: flex; gap: 4px; background: var(--gray-100); padding: 5px; border-radius: 12px; margin-bottom: 24px; }
.tab-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border: none; border-radius: 9px; font-size: .85rem; font-weight: 500; cursor: pointer; background: transparent; color: var(--gray-500); transition: all .2s ease; white-space: nowrap; }
.tab-btn.active { background: white; color: var(--blue-600); box-shadow: var(--shadow-sm); }
.tab-btn svg { width: 16px; height: 16px; }

/* MATCH CARD */
.match-card { border-radius: var(--radius); background: white; box-shadow: var(--shadow-md); padding: 20px; transition: all .3s cubic-bezier(.4,0,.2,1); }
.match-card:hover { transform: translateY(-6px) scale(1.01); box-shadow: 0 20px 40px -12px rgba(0,0,0,.15); }
.match-card .avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid var(--blue-100); transition: transform .4s ease; }
.match-card:hover .avatar { transform: scale(1.08); }

/* CHAT */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 130px); }
.chat-header { display: flex; align-items: center; gap: 12px; padding: 16px; background: white; border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow-sm); border-bottom: 1px solid var(--gray-100); }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; background: var(--gray-50); }
.chat-input-area { background: white; padding: 16px; border-radius: 0 0 var(--radius) var(--radius); border-top: 1px solid var(--gray-100); display: flex; gap: 10px; }
.msg { display: flex; align-items: flex-end; gap: 8px; animation: msgPop .3s cubic-bezier(.68,-.55,.265,1.55) forwards; }
.msg.mine { flex-direction: row-reverse; }
.msg-bubble { max-width: 100%; padding: 10px 14px; border-radius: 18px; font-size: .9rem; line-height: 1.5; }
.msg.theirs .msg-bubble { background: white; color: var(--gray-800); border-bottom-left-radius: 4px; box-shadow: var(--shadow-sm); }
.msg.mine .msg-bubble { background: var(--blue-600); color: white; border-bottom-right-radius: 4px; }
.msg-time { font-size: .7rem; color: var(--gray-400); display: block; margin-top: 3px; }
.msg.mine .msg-time { text-align: right; color: rgba(255,255,255,.7); }
.msg-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.msg-name { font-size: .72rem; color: var(--gray-400); margin-bottom: 2px; }

/* AVATAR */
.avatar-sm { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.avatar-md { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.avatar-lg { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 4px solid #000000 }

/* LANDING HERO */
.hero { background: linear-gradient(135deg, #2563eb 0%, #4338ca 50%, #6d28d9 100%); color: white; padding: 80px 24px; text-align: center; position: relative; overflow: hidden; }
.hero::before,
.hero::after {
  content:'';
  position:absolute;
  width:300px;
  height:300px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(255,255,255,.25), transparent 62%);
  pointer-events:none;
}
.hero::before { top:-120px; left:-80px; animation: floatBlob 11s ease-in-out infinite; }
.hero::after { bottom:-140px; right:-80px; animation: floatBlob 13s ease-in-out infinite reverse; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; margin-bottom: 20px; animation: titlePulse 5s ease-in-out infinite; }
.hero p { font-size: 1.15rem; color: rgba(255,255,255,.85); max-width: 600px; margin: 0 auto 32px; }
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-hero-white { background: white; color: var(--blue-600); padding: 12px 28px; border-radius: 10px; font-weight: 700; transition: all .3s ease; }
.btn-hero-white:hover { background: var(--blue-50); transform: scale(1.05); }
.btn-hero-outline { border: 2px solid white; color: white; padding: 12px 28px; border-radius: 10px; font-weight: 700; transition: all .3s ease; }
.btn-hero-outline:hover { background: rgba(255,255,255,.1); transform: scale(1.05); }
.feature-icon { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.feature-icon svg { width: 28px; height: 28px; }
.step-number { width: 48px; height: 48px; border-radius: 50%; background: var(--blue-600); color: white; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; margin: 0 auto 14px; }

/* TABLE */
.table-wrap { overflow-x: auto; border-radius: var(--radius); max-width: 100%; }
table { width: 100%; border-collapse: collapse; }
thead th { background: var(--gray-50); padding: 12px 14px; text-align: left; font-size: .78rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--gray-200); }
tbody td { padding: 13px 14px; font-size: .87rem; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
tbody tr:hover td { background: var(--gray-50); }
tbody tr:last-child td { border-bottom: none; }

/* UPLOAD ZONE */
.upload-zone { border: 2px dashed var(--gray-300); border-radius: 12px; padding: 24px; text-align: center; cursor: pointer; transition: all .3s ease; }
.upload-zone:hover { border-color: var(--blue-600); background: var(--blue-50); transform: scale(1.01); }
.upload-zone.has-image { border-color: var(--green-600); background: var(--green-50); }
.upload-zone.required { border-color: #fca5a5; background: var(--red-50); }

/* SECTION CARDS (signup) */
.section-card { border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.section-card.blue { background: var(--blue-50); border: 1px solid var(--blue-100); }
.section-card.amber { background: var(--amber-50); border: 1px solid var(--amber-100); }
.section-card.purple { background: var(--purple-50); border: 1px solid var(--purple-100); }
.section-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.section-card.blue h3 { color: #1e40af; }
.section-card.amber h3 { color: #92400e; }
.section-card.purple h3 { color: #6b21a8; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ANIMATIONS */
.animate-fade-in { animation: fadeIn .6s ease-out forwards; }
.animate-slide-up { animation: slideUp .5s ease-out forwards; }
.animate-scale-in { animation: scaleIn .4s ease-out forwards; }
.animate-shake { animation: shake .5s ease-in-out; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
@keyframes msgPop { from { opacity: 0; transform: scale(.85) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes cardFloatIn { from { opacity:0; transform: translateY(14px) scale(.98);} to { opacity:1; transform: translateY(0) scale(1);} }
@keyframes floatBlob {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(16px,-12px) scale(1.08); }
}
@keyframes titlePulse {
  0%,100% { transform: translateY(0); text-shadow: 0 0 0 rgba(255,255,255,0); }
  50% { transform: translateY(-1px); text-shadow: 0 10px 30px rgba(255,255,255,.22); }
}
.spinner { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.3); border-top-color: white; border-radius: 50%; animation: spin 1s linear infinite; display: inline-block; }
.spinner-dark { border-color: rgba(0,0,0,.15); border-top-color: var(--blue-600); }

/* OTP input */
.otp-input { text-align: center; font-size: 2rem; font-family: monospace; letter-spacing: .6em; font-weight: 700; }

/* AUTH WRAPPER */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%); }
.auth-card { background: linear-gradient(180deg,#ffffff 0%, #fefeff 100%); border-radius: 20px; box-shadow: 0 25px 50px -12px rgba(0,0,0,.15); border: 1px solid #e8edf6; padding: 40px; width: 100%; max-width: 480px; animation: cardFloatIn .5s ease both; }
.auth-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--blue-100); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.auth-icon svg { width: 32px; height: 32px; color: var(--blue-600); }
.auth-title { text-align: center; font-size: 1.6rem; font-weight: 800; margin-bottom: 4px; }
.auth-sub { text-align: center; color: var(--gray-500); font-size: .9rem; margin-bottom: 24px; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-400); }
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 14px; opacity: .4; }
.empty-state p { font-size: .95rem; }

/* PROFILE */
.profile-field { display: flex; align-items: center; gap: 8px; color: var(--gray-800); font-size: .92rem; }
.profile-field svg { width: 16px; height: 16px; color: var(--gray-400); flex-shrink: 0; }

/* VIP accents without performance cost */
.vip-card{
    background-color:black;
}
.vip-title {
  background: linear-gradient(135deg, #2b5ae4, #000000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.vip-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 600;
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #dbe4ff;
}
.dev-image {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,.65);
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.4);
}
.dev-card-shell { border: 1px solid #e8edf6; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 20px 16px; }
  .card-grid-2, .card-grid-3, .card-grid-4, .grid-2 { grid-template-columns: 1fr; }
  .tabs { flex-wrap: wrap; }
  .tab-btn { min-width: calc(50% - 4px); flex: 1 1 calc(50% - 4px); }
  .auth-card { padding: 28px 20px; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .chat-header { padding: 12px; }
  .chat-messages { padding: 14px; }
  .chat-input-area { padding: 10px; }
  .msg-bubble { max-width: 85%; }
  table { min-width: 760px; }
  .hero { padding: 62px 18px; }
  .hero p { font-size: 1rem; }
  .card { padding: 16px; }
  .stat-card .stat-value { font-size: 1.5rem; }
  .btn-sm { padding: 6px 10px; font-size: .76rem; }
  .sidebar-item { padding: 10px 12px; }
  .profile-field { font-size: .86rem; }
  .upload-zone { padding: 16px; }
  .dev-card-inner { flex-direction: column; }
  .dev-card-side { width: 100% !important; min-height: 210px; }
}

@media (max-width: 480px) {
  .main-content { padding: 14px 10px; }
  .btn { padding: 9px 14px; font-size: .82rem; }
  .auth-wrap { padding: 14px; }
  .auth-card { border-radius: 14px; padding: 18px 14px; }
  .avatar-lg { width: 80px; height: 80px; }
  .otp-input { font-size: 1.5rem; letter-spacing: .45em; }
  .tabs { gap: 6px; }
  .tab-btn { min-width: 100%; flex: 1 1 100%; }
  .chat-header { gap: 8px; }
  .chat-header p { font-size: .74rem !important; }
  .chat-input-area .btn { padding: 9px 12px; }
  .msg-bubble { font-size: .84rem; padding: 9px 11px; }
  .main-content h2 { font-size: 1.25rem; }
  .hero::before, .hero::after { width: 180px; height: 180px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-300); }
