
/* HOATRADER STOCK SYSTEM V1.5 - FULL UI THEME
   Upload to: public_html/stock/assets/css/app.css
*/

:root{
  --bg:#070b13;
  --bg2:#0b1220;
  --panel:#0f172a;
  --panel2:#111c31;
  --card:#111827;
  --card2:#162033;
  --line:#263449;
  --line2:#334155;
  --text:#e5edf9;
  --muted:#94a3b8;
  --muted2:#64748b;
  --primary:#2563eb;
  --primary2:#38bdf8;
  --success:#16a34a;
  --warning:#f59e0b;
  --danger:#dc2626;
  --violet:#7c3aed;
  --shadow:0 18px 50px rgba(0,0,0,.28);
  --radius:16px;
}

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  min-height:100vh;
  font-family:Arial, Helvetica, sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.18), transparent 34%),
    radial-gradient(circle at top right, rgba(56,189,248,.12), transparent 28%),
    linear-gradient(180deg, #070b13 0%, #0b1220 100%);
  font-size:15px;
  line-height:1.55;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size:38px 38px;
  mask-image:linear-gradient(to bottom, rgba(0,0,0,.75), transparent 80%);
}

a{
  color:#60a5fa;
  text-decoration:none;
  transition:.18s ease;
}

a:hover{
  color:#93c5fd;
  text-decoration:none;
}

.container,
main{
  width:min(1240px, calc(100% - 32px));
  margin:0 auto;
}

main{
  padding:18px 0 60px;
}

h1,h2,h3,h4{
  color:#f8fafc;
  margin-top:0;
  letter-spacing:-.02em;
}

h1{
  font-size:32px;
  margin-bottom:6px;
}

h2{
  font-size:24px;
  margin-bottom:14px;
}

h3{
  font-size:19px;
}

p{
  color:#cbd5e1;
}

small,
.muted{
  color:var(--muted);
}

hr{
  border:0;
  border-top:1px solid var(--line);
  margin:24px 0;
}

/* Header / Topbar */
.topbar,
header,
.site-header{
  background:rgba(15,23,42,.86);
  border-bottom:1px solid rgba(148,163,184,.18);
  backdrop-filter:blur(12px);
  box-shadow:0 10px 30px rgba(0,0,0,.22);
  margin-bottom:24px;
}

.topbar-inner,
.header-inner{
  width:min(1240px, calc(100% - 32px));
  margin:0 auto;
  padding:18px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

.brand,
.logo{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.brand h1,
.logo h1,
header h1{
  margin:0;
  font-size:25px;
  background:linear-gradient(90deg,#fff,#93c5fd,#38bdf8);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.brand p,
header p{
  margin:0;
  color:var(--muted);
}

/* If old pages have plain first h1/p/nav without wrapper */
body > h1:first-child{
  width:min(1240px, calc(100% - 32px));
  margin:24px auto 4px;
  font-size:30px;
  background:linear-gradient(90deg,#fff,#93c5fd,#38bdf8);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

body > p:nth-child(2){
  width:min(1240px, calc(100% - 32px));
  margin:0 auto 16px;
  color:var(--muted);
}

/* Navigation */
.nav,
nav,
body > a,
body > p + a{
  font-weight:600;
}

nav,
.nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

nav a,
.nav a,
body > a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:38px;
  padding:8px 13px;
  border:1px solid rgba(148,163,184,.18);
  border-radius:999px;
  background:rgba(17,24,39,.82);
  color:#dbeafe;
  box-shadow:0 8px 20px rgba(0,0,0,.16);
}

nav a:hover,
.nav a:hover,
body > a:hover{
  transform:translateY(-1px);
  border-color:rgba(96,165,250,.55);
  background:rgba(37,99,235,.18);
  color:#fff;
}

/* Wrap old direct page contents visually */
body > h2,
body > form,
body > table,
body > ul,
body > div:not(.topbar):not(.container):not(.header-inner):not(.topbar-inner),
body > section{
  width:min(1240px, calc(100% - 32px));
  margin-left:auto;
  margin-right:auto;
}

body > h2{
  margin-top:24px;
  margin-bottom:12px;
}

/* Cards */
.card,
.panel,
.box,
section{
  background:linear-gradient(180deg, rgba(17,24,39,.96), rgba(15,23,42,.96));
  border:1px solid rgba(148,163,184,.16);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
  margin-bottom:18px;
}

.card h2,
.panel h2,
.box h2,
section h2{
  margin-bottom:14px;
}

/* Stats */
.grid{
  display:grid;
  gap:18px;
}

.stats-grid,
.stats,
.kpi-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
  width:min(1240px, calc(100% - 32px));
  margin:0 auto 18px;
}

.stat-card,
.stat,
.kpi{
  background:
    linear-gradient(135deg, rgba(37,99,235,.15), rgba(56,189,248,.06)),
    rgba(17,24,39,.94);
  border:1px solid rgba(96,165,250,.22);
  border-radius:18px;
  padding:18px;
  box-shadow:var(--shadow);
}

.stat-card .label,
.stat .label,
.kpi .label{
  color:var(--muted);
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.stat-card .value,
.stat .value,
.kpi .value{
  display:block;
  margin-top:6px;
  font-size:32px;
  font-weight:800;
  color:#fff;
}

/* Tables */
.table-wrap{
  overflow-x:auto;
  border:1px solid rgba(148,163,184,.16);
  border-radius:16px;
  box-shadow:var(--shadow);
  margin-bottom:18px;
}

table{
  width:100%;
  border-collapse:collapse;
  background:rgba(15,23,42,.96);
  color:var(--text);
}

th,
td{
  padding:12px 12px;
  border-bottom:1px solid rgba(148,163,184,.14);
  text-align:left;
  vertical-align:middle;
}

th{
  color:#bfdbfe;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.055em;
  background:rgba(30,41,59,.9);
  position:sticky;
  top:0;
  z-index:1;
}

tr:hover td{
  background:rgba(37,99,235,.08);
}

/* Old pages table directly after h2 */
body > table{
  border:1px solid rgba(148,163,184,.16);
  border-radius:16px;
  overflow:hidden;
  box-shadow:var(--shadow);
}

/* Forms */
form{
  background:rgba(15,23,42,.78);
  border:1px solid rgba(148,163,184,.16);
  border-radius:16px;
  padding:18px;
  box-shadow:var(--shadow);
  margin-bottom:20px;
}

label{
  color:#cbd5e1;
  font-weight:600;
}

input,
textarea,
select{
  max-width:100%;
  padding:10px 12px;
  border-radius:11px;
  border:1px solid rgba(148,163,184,.22);
  background:#08111f;
  color:#e5edf9;
  outline:none;
  transition:.18s ease;
}

input:focus,
textarea:focus,
select:focus{
  border-color:#60a5fa;
  box-shadow:0 0 0 4px rgba(37,99,235,.18);
}

input::placeholder,
textarea::placeholder{
  color:#64748b;
}

textarea{
  min-height:92px;
  resize:vertical;
}

input[type="checkbox"]{
  width:17px;
  height:17px;
  vertical-align:middle;
  accent-color:#2563eb;
}

.form-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:14px;
}

.form-grid .full{
  grid-column:1/-1;
}

/* Buttons */
button,
.btn,
input[type="submit"]{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:40px;
  padding:10px 15px;
  border-radius:12px;
  border:1px solid rgba(96,165,250,.28);
  background:linear-gradient(135deg,#2563eb,#0ea5e9);
  color:#fff;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 10px 24px rgba(37,99,235,.22);
  transition:.18s ease;
}

button:hover,
.btn:hover,
input[type="submit"]:hover{
  transform:translateY(-1px);
  filter:brightness(1.06);
}

.btn.secondary,
button.secondary{
  background:rgba(15,23,42,.9);
  border-color:rgba(148,163,184,.22);
  color:#e5edf9;
  box-shadow:none;
}

.btn.danger,
button.danger{
  background:linear-gradient(135deg,#dc2626,#f97316);
  border-color:rgba(248,113,113,.35);
}

/* Alerts */
.alert,
.notice,
.success,
.error{
  width:min(1240px, calc(100% - 32px));
  margin:0 auto 16px;
  padding:13px 16px;
  border-radius:14px;
  border:1px solid rgba(148,163,184,.16);
}

.alert.success,
.notice.success,
.success{
  background:rgba(22,163,74,.13);
  border-color:rgba(34,197,94,.34);
  color:#bbf7d0;
}

.alert.error,
.notice.error,
.error{
  background:rgba(220,38,38,.13);
  border-color:rgba(248,113,113,.34);
  color:#fecaca;
}

.badge{
  display:inline-flex;
  align-items:center;
  padding:4px 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  background:rgba(96,165,250,.15);
  color:#bfdbfe;
  border:1px solid rgba(96,165,250,.24);
}

.badge.green{background:rgba(22,163,74,.14);color:#bbf7d0;border-color:rgba(34,197,94,.26)}
.badge.red{background:rgba(220,38,38,.14);color:#fecaca;border-color:rgba(248,113,113,.26)}
.badge.yellow{background:rgba(245,158,11,.14);color:#fde68a;border-color:rgba(245,158,11,.28)}

/* Specific old layout improvements */
body > h2 + a,
body > a + a{
  margin-left:8px;
}

body > ul{
  background:rgba(15,23,42,.78);
  border:1px solid rgba(148,163,184,.16);
  border-radius:16px;
  padding:18px 18px 18px 38px;
  box-shadow:var(--shadow);
}

li{
  margin:7px 0;
  color:#cbd5e1;
}

/* Dashboard direct text blocks */
body > h2 + div,
body > h2 + p{
  background:rgba(15,23,42,.78);
  border:1px solid rgba(148,163,184,.16);
  border-radius:16px;
  padding:16px;
  box-shadow:var(--shadow);
}

/* Financial styling */
.price-up,
.positive{
  color:#22c55e !important;
  font-weight:800;
}

.price-down,
.negative{
  color:#ef4444 !important;
  font-weight:800;
}

.price-neutral{
  color:#facc15 !important;
  font-weight:800;
}

/* Footer */
footer{
  width:min(1240px, calc(100% - 32px));
  margin:30px auto;
  color:var(--muted2);
  text-align:center;
}

/* Mobile */
@media(max-width:900px){
  .topbar-inner,
  .header-inner{
    flex-direction:column;
    align-items:flex-start;
  }

  .stats-grid,
  .stats,
  .kpi-grid,
  .form-grid,
  .two-col,
  .three-col{
    grid-template-columns:1fr;
  }

  h1{
    font-size:26px;
  }

  body > h1:first-child{
    font-size:26px;
  }

  table{
    min-width:760px;
  }

  input,
  textarea,
  select{
    width:100%;
  }
}
