/* =========================================================
   GPC Buy Sale — Deal Guard inspired compact UI
   Upload as: /assets/style.css
   ========================================================= */

:root{
  --bg:#f4f6f9;
  --panel:#ffffff;
  --text:#303946;
  --muted:#8a95a3;
  --line:#e4e8ee;
  --primary:#4098f7;
  --primary-soft:#eaf4ff;
  --orange:#ff5b00;
  --danger:#e14b4b;
  --success:#2fa66d;
  --sidebar:258px;
  --radius:8px;
  --shadow:0 2px 10px rgba(29,43,67,.06);
}

*{box-sizing:border-box}

html{
  font-size:14px;
  scroll-behavior:smooth;
}

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:Arial,Helvetica,sans-serif;
  font-size:14px;
  line-height:1.45;
  -webkit-font-smoothing:antialiased;
}

a{
  color:inherit;
  text-decoration:none;
}

button,input,select,textarea{
  font:inherit;
}

img{
  max-width:100%;
  display:block;
}

/* Layout */
.app-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:var(--sidebar) minmax(0,1fr);
}

.sidebar{
  position:fixed;
  inset:0 auto 0 0;
  z-index:1000;
  width:var(--sidebar);
  overflow-y:auto;
  background:#fff;
  border-right:1px solid #e3e7ed;
}

.page-area{
  min-width:0;
  grid-column:2;
}

.content-wrap{
  width:100%;
  max-width:none;
  margin:0;
  padding:22px 20px 38px;
}

.mobile-topbar{
  display:none;
}

/* Sidebar */
.sidebar-brand{
  min-height:78px;
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 20px;
  border-bottom:1px solid #edf0f3;
  color:#318cf3;
  font-size:20px;
  font-weight:700;
}

.brand-mark{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border:3px solid #195cf0;
  border-radius:9px;
  color:#195cf0;
  font-size:23px;
  font-weight:900;
  transform:rotate(45deg);
}

.brand-mark::first-letter{
  transform:rotate(-45deg);
}

.side-nav{
  display:grid;
  gap:7px;
  padding:22px 9px 10px;
}

.side-nav a{
  min-height:54px;
  display:flex;
  align-items:center;
  gap:13px;
  padding:0 25px;
  border-radius:9px;
  color:#434d5c;
  font-size:16px;
  font-weight:400;
  transition:.18s ease;
}

.side-nav a span:first-child{
  width:18px;
  flex:0 0 18px;
  text-align:center;
  color:#697482;
}

.side-nav a:hover{
  background:#f3f7fc;
  color:var(--primary);
}

.side-nav a.active{
  background:#eaf4ff;
  color:#3596f7;
}

.side-nav a.active span:first-child{
  color:#3596f7;
}

.sidebar-action{
  padding:10px 21px 4px;
}

.outline-btn{
  width:100%;
  min-height:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #73b4ff;
  border-radius:3px;
  color:#3596f7!important;
  background:#fff;
  font-size:12px;
}

.signed-user{
  margin-bottom:9px;
  padding:10px;
  background:#f8fafc;
  border-radius:7px;
}

.signed-user strong,
.signed-user span{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.signed-user strong{font-size:13px}
.signed-user span{margin-top:3px;color:#9099a5;font-size:10px}

.language-box{
  min-height:34px;
  margin:13px 21px 11px;
  padding:0 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-radius:4px;
  background:#f5f7fa;
  color:#4d5764;
  font-size:13px;
}

.side-nav.lower{
  gap:0;
  padding-top:6px;
}

.side-nav.lower a{
  min-height:46px;
  padding-left:18px;
  font-size:14px;
}

/* General typography */
h1,h2,h3,h4{
  color:#252e3a;
  line-height:1.3;
}

h1{font-size:26px}
h2{font-size:20px}
h3{font-size:16px}

p{
  margin-top:0;
}

small,.muted{
  color:var(--muted);
}

/* Buttons */
.btn,
button.btn,
input[type="submit"]{
  min-height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:0 16px;
  border:0;
  border-radius:4px;
  background:#4098f7;
  color:#fff!important;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  transition:.18s ease;
}

.btn:hover,
button.btn:hover{
  filter:brightness(.97);
}

.btn.secondary{
  background:#fff;
  color:#596473!important;
  border:1px solid #dfe4ea;
}

.btn.danger{background:var(--danger)}
.btn.success{background:var(--success)}

/* Forms */
input,
select,
textarea{
  width:100%;
  border:1px solid #dce2e8;
  border-radius:4px;
  background:#fff;
  color:#35404c;
  outline:none;
  transition:border-color .18s,box-shadow .18s;
}

input,
select{
  height:38px;
  padding:0 12px;
}

textarea{
  min-height:100px;
  padding:10px 12px;
  resize:vertical;
}

input:focus,
select:focus,
textarea:focus{
  border-color:#78b8fa;
  box-shadow:0 0 0 2px rgba(64,152,247,.10);
}

label{
  color:#566170;
  font-size:12px;
  font-weight:600;
}

/* Common cards */
.card,
.panel,
.profile-card,
.dashboard-panel,
.balance-card,
.summary-card,
.notification-list,
.table-wrap{
  border:1px solid var(--line)!important;
  border-radius:var(--radius)!important;
  background:#fff!important;
  box-shadow:none!important;
}

.panel-header{
  padding:15px 17px!important;
  border-bottom:1px solid #edf0f4!important;
}

.panel-header h2{
  font-size:17px!important;
}

.panel-body{
  padding:17px!important;
}

/* Hero sections — compact Deal Guard look */
.dashboard-hero,
.wallet-hero,
.profile-hero,
.notifications-hero,
.history-hero,
.release-hero,
.withdraw-hero,
.hero{
  min-height:auto!important;
  padding:20px 22px!important;
  margin-bottom:16px!important;
  border-radius:8px!important;
  background:linear-gradient(105deg,#1838dd,#4250e9 60%,#7a72ef)!important;
  box-shadow:none!important;
}

.dashboard-hero h1,
.wallet-hero h1,
.profile-hero h1,
.notifications-hero h1,
.history-hero h1,
.release-hero h1,
.withdraw-hero h1,
.hero h1{
  margin:0 0 5px!important;
  color:#fff!important;
  font-size:24px!important;
}

.dashboard-hero p,
.wallet-hero p,
.profile-hero p,
.notifications-hero p,
.history-hero p,
.release-hero p,
.withdraw-hero p,
.hero p{
  margin:0!important;
  color:#e8ebff!important;
  font-size:12px!important;
}

/* Dashboard */
.dashboard-page{padding-bottom:25px!important}

.dashboard-stats{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
  margin:14px 0 18px!important;
}

.dashboard-stat{
  padding:16px!important;
  border-radius:7px!important;
  box-shadow:none!important;
}

.dashboard-stat span{
  font-size:10px!important;
}

.dashboard-stat strong{
  margin-top:5px!important;
  font-size:25px!important;
}

.dashboard-grid{
  gap:14px!important;
}

.deal-row{
  padding:12px 15px!important;
  font-size:12px!important;
}

.deal-row.header{
  font-size:10px!important;
}

.open-link{
  min-height:31px!important;
  padding:0 10px!important;
  border-radius:4px!important;
  font-size:11px!important;
}

.listing-stack{
  gap:9px!important;
  padding:12px!important;
}

.listing-mini{
  padding:12px!important;
  border-radius:6px!important;
}

.listing-mini h3{
  margin:7px 0 6px!important;
  font-size:14px!important;
}

.listing-mini-price{
  font-size:18px!important;
}

/* Profile */
.profile-layout{
  grid-template-columns:280px minmax(0,1fr)!important;
  gap:14px!important;
}

.profile-summary{
  padding:18px!important;
}

.avatar-wrap{
  width:90px!important;
  height:90px!important;
  margin-bottom:12px!important;
  font-size:32px!important;
  box-shadow:none!important;
}

.profile-summary h2{
  font-size:18px!important;
}

.profile-summary p{
  font-size:10px!important;
}

.profile-menu a{
  padding:12px 15px!important;
  font-size:12px!important;
}

.form-card{
  padding:18px!important;
}

.section-title{
  margin-bottom:14px!important;
  font-size:18px!important;
}

.info-box{
  padding:11px 13px!important;
  font-size:11px!important;
}

.field-grid{
  gap:11px!important;
}

.field label{
  margin-bottom:5px!important;
  font-size:11px!important;
}

.save-button{
  min-height:40px!important;
  min-width:145px!important;
  border-radius:4px!important;
  font-size:12px!important;
}

/* Wallet */
.wallet-page{padding-bottom:25px!important}

.wallet-currency{
  min-width:70px!important;
  min-height:55px!important;
  border-radius:8px!important;
  font-size:18px!important;
}

.balance-grid{
  gap:11px!important;
  margin-bottom:14px!important;
}

.balance-card{
  padding:16px!important;
}

.balance-card span{
  font-size:9px!important;
}

.balance-card strong{
  margin-top:5px!important;
  font-size:24px!important;
}

.wallet-layout{
  gap:14px!important;
}

.transaction-row{
  padding:11px 14px!important;
  font-size:11px!important;
}

.withdrawal-item{
  padding:10px!important;
  border-radius:5px!important;
}

/* Notifications */
.notifications-page{padding-bottom:25px!important}

.hero-count{
  min-width:56px!important;
  min-height:56px!important;
  border-radius:9px!important;
  font-size:21px!important;
}

.notification-summary{
  gap:11px!important;
  margin-bottom:13px!important;
}

.summary-card{
  padding:14px!important;
}

.summary-card strong{
  margin-top:4px!important;
  font-size:23px!important;
}

.notification-toolbar{
  margin-bottom:12px!important;
}

.filter-tabs a{
  padding:8px 12px!important;
  border-radius:4px!important;
  font-size:11px!important;
}

.notification-item{
  grid-template-columns:42px minmax(0,1fr) auto!important;
  gap:11px!important;
  padding:13px 15px!important;
}

.notification-icon{
  width:36px!important;
  height:36px!important;
  border-radius:7px!important;
}

.notification-content strong{
  font-size:14px!important;
}

.notification-content p{
  margin:4px 0 6px!important;
  font-size:11px!important;
}

.notification-actions a,
.notification-actions button{
  min-height:30px!important;
  padding:0 9px!important;
  border-radius:4px!important;
  font-size:9px!important;
}

/* Status pills */
.status-badge,
.profile-badge,
.social-status,
.listing-state,
.badge{
  border-radius:999px!important;
  font-size:9px!important;
}

/* Flash messages */
.flash,
.alert{
  margin-bottom:13px;
  padding:10px 13px;
  border:1px solid #d8e6f6;
  border-radius:5px;
  background:#edf6ff;
  color:#4a6078;
  font-size:12px;
}

/* Tables */
table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
  font-size:12px;
}

th,td{
  padding:11px 13px;
  border-bottom:1px solid #edf0f3;
  text-align:left;
}

th{
  background:#f8fafc;
  color:#7d8794;
  font-size:10px;
  text-transform:uppercase;
}

/* Marketplace homepage helper classes */
.market-banner{
  min-height:270px;
  display:grid;
  place-items:center;
  margin-bottom:20px;
  padding:28px;
  border-radius:8px;
  background:linear-gradient(110deg,#1235e8,#3d4deb 60%,#786fee);
  color:#fff;
  text-align:center;
}

.market-banner h1{
  margin:0 0 8px;
  color:#fff;
  font-size:28px;
}

.market-banner p{
  margin:0;
  color:#e8ebff;
  font-size:14px;
}

.category-tabs{
  display:flex;
  overflow-x:auto;
  margin-bottom:16px;
  border:1px solid #dfe4ea;
  border-radius:5px;
  background:#fff;
}

.category-tabs a{
  min-width:86px;
  padding:10px 18px;
  border-right:1px solid #e5e9ee;
  text-align:center;
  font-size:13px;
  white-space:nowrap;
}

.category-tabs a.active{
  background:#4098f7;
  color:#fff;
}

.market-filters{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin-bottom:18px;
  padding:16px 18px;
  border-radius:8px;
  background:#fff;
}

.market-filters input,
.market-filters select{
  width:auto;
  min-width:130px;
}

.market-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}

.market-card{
  overflow:hidden;
  border:1px solid #e6e9ee;
  border-radius:8px;
  background:#fff;
  box-shadow:none;
}

.market-card-head{
  display:flex;
  align-items:center;
  gap:9px;
  padding:12px 14px 8px;
}

.market-avatar{
  width:34px;
  height:34px;
  border-radius:50%;
  overflow:hidden;
  background:#e9edf2;
}

.market-card-body{
  min-height:126px;
  margin:0 13px;
  padding:15px;
  border-radius:4px;
  background:#f8fafc;
  font-size:13px;
  line-height:1.6;
}

.market-card-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px;
}

.market-price{
  color:var(--orange);
  font-size:24px;
  font-weight:800;
}

.buy-button{
  min-width:125px;
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:4px;
  background:var(--orange);
  color:#fff!important;
  font-size:14px;
  font-weight:600;
}

/* Responsive */
@media(max-width:1100px){
  .market-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media(max-width:900px){
  .app-shell{display:block}

  .sidebar{
    transform:translateX(-100%);
    transition:transform .2s ease;
  }

  body.sidebar-open .sidebar{
    transform:translateX(0);
  }

  .page-area{
    width:100%;
  }

  .mobile-topbar{
    position:sticky;
    top:0;
    z-index:900;
    min-height:58px;
    display:flex;
    align-items:center;
    gap:12px;
    padding:0 14px;
    border-bottom:1px solid #e5e8ed;
    background:#fff;
  }

  .menu-toggle{
    width:38px;
    height:38px;
    border:0;
    border-radius:6px;
    background:#f0f4f8;
    color:#3a4655;
    cursor:pointer;
  }

  .mobile-brand{
    color:#2c8df3;
    font-size:17px;
    font-weight:700;
  }

  .content-wrap{
    padding:15px 12px 28px;
  }

  .profile-layout,
  .wallet-layout,
  .dashboard-grid{
    grid-template-columns:1fr!important;
  }
}

@media(max-width:650px){
  html{font-size:13px}

  .market-grid{grid-template-columns:1fr}

  .dashboard-stats,
  .balance-grid,
  .notification-summary{
    grid-template-columns:1fr!important;
  }

  .dashboard-hero,
  .wallet-hero,
  .profile-hero,
  .notifications-hero{
    padding:17px!important;
  }

  .market-banner{
    min-height:190px;
  }

  .market-filters{
    align-items:stretch;
    flex-direction:column;
  }

  .market-filters input,
  .market-filters select{
    width:100%;
  }

  .notification-item{
    grid-template-columns:36px 1fr!important;
  }

  .notification-actions{
    grid-column:1/-1;
    justify-content:flex-start!important;
  }
}