/* ============================================
   GMAPP Rebrands — Dark Luxury Theme
   ============================================ */
:root {
  --bg: #0a0a12; --surface: rgba(255,255,255,0.025); --border: rgba(255,255,255,0.06);
  --text: #fff; --text2: rgba(255,255,255,0.55); --text3: rgba(255,255,255,0.35);
  --accent: #6366f1; --accent2: #8b5cf6; --accent-t: rgba(99,102,241,0.15);
  --green: #34d399; --yellow: #fbbf24; --red: #f87171; --pink: #ec4899;
  --radius: 14px; --radius-sm: 10px; --radius-lg: 20px;
  --font: 'DM Sans', sans-serif; --font-display: 'Playfair Display', serif;
}
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, textarea, select, button { font-family: var(--font); font-size: 14px; }
input::placeholder, textarea::placeholder { color: rgba(255,255,255,0.25); }
select option { background: #1a1a2e; color: #fff; }
::-webkit-scrollbar { width: 6px; } ::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::selection { background: rgba(99,102,241,0.3); }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.page-pad { padding: 40px 24px 80px; max-width: 1200px; margin: 0 auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 24px; }
.grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 40px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; gap: 12px; }
.gap-8 { gap: 8px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.mb-40 { margin-bottom: 40px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(10,10,18,0.88); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-bottom: 1px solid rgba(255,255,255,0.04); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 72px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent2)); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; color: #fff; }
.logo-icon-sm { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, var(--accent), var(--accent2)); display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 9px; color: #fff; }
.logo-text { font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.logo-text em { font-style: normal; color: #818cf8; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link { padding: 8px 18px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; color: var(--text2); transition: all 0.2s; }
.nav-link:hover, .nav-link.active { background: var(--accent-t); color: #818cf8; }
.nav-user { display: flex; align-items: center; gap: 10px; margin-left: 8px; }
.user-pill { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.04); border-radius: 12px; padding: 6px 14px 6px 6px; font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.65); transition: background 0.2s; }
.user-pill:hover { background: rgba(255,255,255,0.07); }
.user-avatar-img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.avatar-sm { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: #fff; }

/* Buttons */
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; border: none; border-radius: var(--radius); padding: 16px 36px; font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 28px rgba(99,102,241,0.35); transition: all 0.3s; display: inline-block; text-align: center; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(99,102,241,0.45); }
.btn-primary-sm { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; border: none; border-radius: var(--radius-sm); padding: 8px 18px; font-size: 14px; font-weight: 700; cursor: pointer; display: inline-block; }
.btn-ghost { background: transparent; color: var(--text2); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-sm); padding: 8px 18px; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-block; transition: all 0.2s; }
.btn-ghost:hover { background: rgba(255,255,255,0.05); }
.btn-secondary { background: rgba(255,255,255,0.05); color: #fff; border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius); padding: 17px 40px; font-size: 16px; font-weight: 700; cursor: pointer; display: inline-block; }
.btn-green { background: linear-gradient(135deg, #10b981, #059669); color: #fff; border: none; border-radius: 12px; padding: 12px 28px; font-weight: 700; cursor: pointer; }
.btn-danger { background: rgba(239,68,68,0.1); color: var(--red); border: none; border-radius: var(--radius-sm); padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-edit { background: rgba(99,102,241,0.12); color: #818cf8; border: none; border-radius: var(--radius-sm); padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-logout { background: rgba(239,68,68,0.08); color: var(--red); border: none; border-radius: var(--radius-sm); padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-full { width: 100%; }
.btn-disabled { opacity: 0.4; cursor: default !important; pointer-events: none; }

/* Cards & Surfaces */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.card-hover { transition: all 0.35s; }
.card-hover:hover { background: rgba(255,255,255,0.055); border-color: rgba(99,102,241,0.25); transform: translateY(-6px); box-shadow: 0 16px 48px rgba(0,0,0,0.35); }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 26px 28px; position: relative; overflow: hidden; }
.stat-card .glow { position: absolute; top: -20px; right: -20px; width: 90px; height: 90px; border-radius: 50%; filter: blur(25px); }
.stat-icon { font-size: 28px; margin-bottom: 10px; }
.stat-value { font-size: 32px; font-weight: 800; font-family: var(--font-display); letter-spacing: -0.02em; }
.stat-label { font-size: 13px; color: var(--text3); margin-top: 4px; }

/* Badges */
.badge { padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; display: inline-block; text-transform: uppercase; }
.badge-default { background: var(--accent-t); color: #818cf8; }
.badge-success { background: rgba(16,185,129,0.15); color: var(--green); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--yellow); }
.badge-danger { background: rgba(239,68,68,0.15); color: var(--red); }
.badge-premium { background: linear-gradient(135deg, rgba(251,191,36,0.2), rgba(245,158,11,0.2)); color: var(--yellow); }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 11px; color: rgba(255,255,255,0.45); margin-bottom: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.form-input { width: 100%; background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.09); border-radius: 12px; padding: 14px 16px; color: #fff; font-size: 15px; outline: none; transition: border 0.2s; }
.form-input:focus { border-color: rgba(99,102,241,0.4); }
.form-input-sm { padding: 12px 16px; font-size: 14px; }
textarea.form-input { resize: vertical; min-height: 80px; }
select.form-input { appearance: none; cursor: pointer; }

/* Flash Messages */
.flash { max-width: 1200px; margin: 16px auto; padding: 14px 20px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.flash-error { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.15); color: var(--red); }
.flash-success { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.15); color: var(--green); }

/* Hero */
.hero { padding: 110px 24px 90px; text-align: center; position: relative; overflow: hidden; }
.hero-glow { position: absolute; inset: 0; background: radial-gradient(ellipse 60% 50% at 50% 30%, rgba(99,102,241,0.08) 0%, transparent 70%); pointer-events: none; }
.hero h1 { font-size: clamp(42px, 6vw, 76px); font-weight: 900; line-height: 1.04; font-family: var(--font-display); letter-spacing: -0.03em; max-width: 820px; margin: 0 auto 28px; }
.hero h1 .gradient { background: linear-gradient(135deg, #818cf8, #c084fc, #f472b6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 18px; color: rgba(255,255,255,0.45); max-width: 580px; margin: 0 auto 44px; line-height: 1.75; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Stats Bar */
.stats-bar { display: flex; justify-content: center; gap: 64px; padding: 44px 24px; border-top: 1px solid rgba(255,255,255,0.04); border-bottom: 1px solid rgba(255,255,255,0.04); margin-bottom: 64px; flex-wrap: wrap; }
.stats-bar .stat { text-align: center; }
.stats-bar .stat-num { font-size: 38px; font-weight: 900; font-family: var(--font-display); }
.stats-bar .stat-text { font-size: 13px; color: var(--text3); margin-top: 4px; }

/* App Cards */
.app-card { border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; }
.app-thumb { height: 200px; display: flex; align-items: center; justify-content: center; position: relative; background-size: cover; background-position: center; }
.app-thumb-placeholder { font-size: 52px; opacity: 0.25; }
.app-thumb .badge { position: absolute; top: 16px; right: 16px; }
.app-body { padding: 20px 24px 24px; }
.app-title { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.app-desc { color: var(--text3); font-size: 13.5px; line-height: 1.65; margin-bottom: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app-price { font-size: 26px; font-weight: 800; font-family: var(--font-display); }
.app-rating { color: var(--yellow); font-size: 14px; font-weight: 600; }

/* Detail Page */
.detail-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.detail-main-img { border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--border); height: 420px; display: flex; align-items: center; justify-content: center; }
.detail-main-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-gallery { display: flex; gap: 8px; margin-top: 16px; }
.detail-gallery img { width: 80px; height: 80px; border-radius: 12px; object-fit: cover; cursor: pointer; border: 1px solid rgba(255,255,255,0.08); opacity: 0.6; transition: all 0.2s; }
.detail-gallery img:hover, .detail-gallery img.active { opacity: 1; border-color: var(--accent); }
.detail-price { font-size: 44px; font-weight: 900; font-family: var(--font-display); margin-bottom: 28px; }
.features-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feature-item { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.65); font-size: 14px; }
.feature-check { color: var(--green); }

/* Auth Pages */
.auth-wrap { display: flex; align-items: center; justify-content: center; min-height: 80vh; padding: 24px; }
.auth-box { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 52px 48px; }
.auth-title { font-size: 30px; font-weight: 800; font-family: var(--font-display); text-align: center; margin-bottom: 8px; }
.auth-sub { color: var(--text3); text-align: center; margin-bottom: 36px; font-size: 14px; }
.demo-box { margin-top: 28px; padding: 16px 18px; background: rgba(99,102,241,0.06); border-radius: 14px; font-size: 12.5px; color: rgba(255,255,255,0.45); line-height: 1.7; border: 1px solid rgba(99,102,241,0.1); }

/* Dashboard Tabs */
.tabs { display: flex; gap: 4px; margin-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.tab { background: transparent; color: var(--text3); border: none; border-bottom: 2px solid transparent; border-radius: 10px 10px 0 0; padding: 12px 24px; cursor: pointer; font-size: 14px; font-weight: 600; transition: all 0.2s; text-decoration: none; display: inline-block; }
.tab:hover { color: var(--text2); }
.tab.active { background: rgba(99,102,241,0.12); color: #818cf8; border-bottom-color: var(--accent); }
.tab .notif { margin-left: 6px; background: var(--yellow); color: #000; border-radius: 10px; padding: 1px 7px; font-size: 11px; font-weight: 800; }

/* Update Cards */
.update-card { border-radius: 16px; padding: 24px; margin-bottom: 12px; cursor: pointer; transition: all 0.2s; }
.update-new { background: rgba(99,102,241,0.05); border: 1px solid rgba(99,102,241,0.12); }
.update-read { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); }

/* Community Chat */
.chat-layout { max-width: 1200px; margin: 0 auto; padding: 40px 24px 0; height: calc(100vh - 112px); display: flex; }
.chat-sidebar { width: 220px; background: rgba(255,255,255,0.02); border-radius: 18px 0 0 18px; border: 1px solid var(--border); border-right: none; padding: 16px; flex-shrink: 0; display: flex; flex-direction: column; }
.chat-main { flex: 1; display: flex; flex-direction: column; background: rgba(255,255,255,0.015); border-radius: 0 18px 18px 0; border: 1px solid var(--border); }
.chat-header { padding: 16px 24px; border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; gap: 12px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.chat-input-bar { padding: 16px 24px; border-top: 1px solid rgba(255,255,255,0.05); display: flex; gap: 12px; }
.channel-btn { display: flex; align-items: center; gap: 10px; width: 100%; background: transparent; border: none; border-radius: 10px; padding: 10px 12px; cursor: pointer; color: var(--text3); font-size: 14px; text-align: left; margin-bottom: 2px; transition: all 0.15s; }
.channel-btn:hover { background: rgba(255,255,255,0.04); }
.channel-btn.active { background: rgba(99,102,241,0.12); color: #818cf8; font-weight: 600; }
.msg-bubble { display: flex; gap: 12px; align-items: flex-start; }
.msg-name { color: #fff; font-weight: 700; font-size: 14px; }
.msg-time { color: rgba(255,255,255,0.2); font-size: 11px; margin-left: 8px; }
.msg-text { color: rgba(255,255,255,0.65); font-size: 14px; line-height: 1.65; margin-top: 4px; }

/* Admin Sidebar */
.admin-layout { display: flex; min-height: calc(100vh - 72px); }
.admin-sidebar { width: 240px; background: rgba(255,255,255,0.015); border-right: 1px solid rgba(255,255,255,0.05); padding: 32px 14px; flex-shrink: 0; }
.admin-content { flex: 1; padding: 32px 40px; overflow-y: auto; }
.admin-nav-btn { display: flex; align-items: center; gap: 12px; width: 100%; background: transparent; border: none; border-radius: 12px; padding: 11px 14px; cursor: pointer; color: var(--text3); font-size: 14px; font-weight: 500; text-align: left; margin-bottom: 3px; text-decoration: none; transition: all 0.15s; }
.admin-nav-btn:hover { background: rgba(255,255,255,0.04); color: var(--text2); }
.admin-nav-btn.active { background: rgba(99,102,241,0.12); color: #818cf8; font-weight: 700; }

/* Section Titles */
.section-title { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); margin-bottom: 16px; }
.page-title { font-size: 28px; font-weight: 800; font-family: var(--font-display); margin-bottom: 32px; }

/* Table-like rows */
.list-row { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 14px; padding: 16px 20px; display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.list-row-thumb { width: 56px; height: 56px; border-radius: 12px; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Footer */
.footer { border-top: 1px solid rgba(255,255,255,0.04); padding: 48px 24px 32px; margin-top: 40px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-weight: 800; font-size: 14px; color: rgba(255,255,255,0.6); }
.footer-sub { color: rgba(255,255,255,0.25); font-size: 13px; }
.footer-copy { color: rgba(255,255,255,0.18); font-size: 12px; }

/* Utility */
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-muted { color: var(--text3); }
.text-white { color: #fff; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text3); }
.empty-icon { font-size: 48px; opacity: 0.2; margin-bottom: 16px; }
.upload-area { background: rgba(99,102,241,0.1); color: #818cf8; border: 1px dashed rgba(99,102,241,0.35); border-radius: 12px; padding: 14px 22px; cursor: pointer; font-size: 13px; font-weight: 600; display: inline-block; }
.img-preview { width: 160px; height: 160px; object-fit: cover; border-radius: 14px; border: 1px solid rgba(255,255,255,0.1); margin-bottom: 12px; }
.img-gallery-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); }
.inline-flex { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 768px) {
  .detail-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; padding: 16px; display: flex; gap: 4px; overflow-x: auto; }
  .admin-sidebar > *:not(a):not(button) { display: none; }
  .chat-layout { flex-direction: column; height: auto; min-height: calc(100vh - 112px); }
  .chat-sidebar { width: 100%; border-radius: 18px 18px 0 0; border-right: 1px solid var(--border); border-bottom: none; }
  .chat-main { border-radius: 0 0 18px 18px; min-height: 400px; }
  .nav-links { gap: 2px; }
  .stats-bar { gap: 32px; }
  .hero h1 { font-size: 36px; }
}
