/* public/assets/premium.css */
:root{
  --bg:#0b0b12;
  --bg-soft:#121225;
  --card:#15152c;
  --purple:#6C3FEF;
  --purple-2:#8a5cff;
  --gold:#E7C873;
  --text:#E8E8F0;
  --muted:#A7A7C7;
  --danger:#ff6b6b;
  --success:#51e0a3;
  --warning:#ffd166;
  --radius:16px;
  --shadow:0 10px 30px rgba(0,0,0,.40);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}
*{box-sizing:border-box}
body{
  margin:0; font-family:var(--sans); color:var(--text);
  background:
    radial-gradient(1200px 600px at 10% 5%, rgba(108,63,239,.20), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(231,200,115,.12), transparent 55%),
    var(--bg);
}
.container{max-width:1100px;margin:0 auto;padding:28px}
a{color:var(--purple-2);text-decoration:none}
a:hover{color:white}
.navbar{
  display:flex;justify-content:space-between;align-items:center;
  background:linear-gradient(135deg, rgba(108,63,239,.12), rgba(231,200,115,.08));
  border:1px solid rgba(255,255,255,.06); padding:14px 18px; border-radius:var(--radius);
  box-shadow:var(--shadow); margin-bottom:18px;
}
.brand{
  font-weight:800; letter-spacing:.4px;
  background:linear-gradient(90deg, var(--purple), var(--purple-2));
  -webkit-background-clip:text; background-clip:text; color:transparent; font-size:18px;
}
.badge{
  background:rgba(108,63,239,.18); color:#d9d2ff; padding:6px 10px; border-radius:999px; font-size:12px;
  border:1px solid rgba(108,63,239,.35); display:inline-block;
}
.card{
  background:var(--card); border:1px solid rgba(255,255,255,.06);
  border-radius:var(--radius); box-shadow:var(--shadow); padding:18px; margin-bottom:18px;
}
.card h3,.card h4{margin:0 0 10px 0}
.card h3,.card h4{margin:0 0 10px 0}
.grid{
  display:grid; gap:18px;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
}
.stat{
  padding:14px; background:var(--bg-soft); border-radius:14px; border:1px solid rgba(255,255,255,.05);
}
.stat .label{color:var(--muted); font-size:12px}
.stat .value{font-size:22px; font-weight:800; margin-top:6px}
.table{
  width:100%; border-collapse:separate; border-spacing:0 8px;
}
.table th{
  text-align:left; font-size:12px; color:var(--muted); font-weight:700; padding:6px 10px;
}
.table td{
  background:var(--bg-soft); padding:10px; font-size:14px; vertical-align:middle;
  border-top:1px solid rgba(255,255,255,.04); border-bottom:1px solid rgba(255,255,255,.04);
}
.table tr td:first-child{border-left:1px solid rgba(255,255,255,.04); border-radius:12px 0 0 12px}
.table tr td:last-child{border-right:1px solid rgba(255,255,255,.04); border-radius:0 12px 12px 0}
.mono{font-family:var(--mono); font-size:12px; color:#c9c9e9}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px; padding:8px 12px; border-radius:12px; border:1px solid transparent;
  font-weight:700; font-size:13px; cursor:pointer; transition:.15s ease; text-decoration:none;
}
.btn:hover{transform:translateY(-1px)}
.btn-primary{
  background:linear-gradient(135deg, var(--purple), var(--purple-2));
  color:white; box-shadow:0 8px 24px rgba(108,63,239,.45);
}
.btn-outline{
  background:transparent; color:var(--text); border-color:rgba(255,255,255,.12);
}
.btn-success{background:rgba(81,224,163,.15); border-color:rgba(81,224,163,.35); color:#b8ffe2}
.btn-warning{background:rgba(255,209,102,.15); border-color:rgba(255,209,102,.35); color:#ffe8a8}
.btn-danger{background:rgba(255,107,107,.18); border-color:rgba(255,107,107,.4); color:#ffc0c0}
.input, select{
  width:100%; background:var(--bg-soft); color:var(--text);
  border:1px solid rgba(255,255,255,.10); border-radius:12px; padding:10px;
  outline:none; font-size:14px;
}
.input::placeholder{color:#7f7fab}
.small{font-size:12px;color:var(--muted)}
hr.sep{border:none;border-top:1px solid rgba(255,255,255,.06);margin:12px 0}
.chart-wrap{height:280px}


/* ===== Responsive upgrades ===== */
.table-wrap{width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; border-radius:12px;}
.table-wrap::-webkit-scrollbar{height:8px}
.table-wrap::-webkit-scrollbar-thumb{background:rgba(255,255,255,.12);border-radius:99px}

.proof-thumb{
  width:72px;height:72px;object-fit:cover;border-radius:10px;
  border:1px solid rgba(255,255,255,.10);
}
.proof-grid{display:flex;gap:8px;flex-wrap:wrap}
.action-stack{display:flex;gap:8px;flex-wrap:wrap}
.action-stack .input{width:auto;min-width:90px}
.action-stack form{display:inline-flex;gap:6px;flex-wrap:wrap;align-items:center}

@media (max-width: 900px){
  .container{padding:18px}
  .navbar{flex-wrap:wrap;gap:10px}
  .chart-wrap{height:240px}
  .stat .value{font-size:20px}
}

@media (max-width: 700px){
  .container{padding:14px}
  .grid{grid-template-columns:1fr; gap:14px}
  .card{padding:16px;margin-bottom:16px}
  .chart-wrap{height:200px}

  /* Turn tables into stacked cards */
  .table thead{display:none}
  .table, .table tbody, .table tr, .table td{display:block;width:100%}
  .table tr{
    background:var(--bg-soft);
    border:1px solid rgba(255,255,255,.05);
    border-radius:14px;
    overflow:hidden;
    margin-bottom:10px;
  }
  .table td{
    display:flex; justify-content:space-between; align-items:flex-start;
    gap:10px; padding:10px 12px; border:none !important;
    border-top:1px solid rgba(255,255,255,.05) !important;
  }
  .table td:first-child{border-top:none !important}
  .table td::before{
    content: attr(data-label);
    flex:0 0 42%; max-width:42%;
    font-size:11px; color:var(--muted); font-weight:800;
    letter-spacing:.4px; text-transform:uppercase;
    padding-right:6px;
  }
  .table td[data-label="Link"] a{word-break:break-all}
  .table td:last-child{padding-bottom:12px}
}

@media (max-width: 420px){
  .brand{font-size:16px}
  .btn{font-size:12px;padding:7px 10px}
  .input{font-size:13px;padding:9px}
  .stat{padding:12px}
  .stat .value{font-size:18px}
}

/* =========================
   RESPONSIVE UPGRADE (MOBILE FIRST)
   paste at the END of premium.css
========================= */

/* global spacing */
.container{ padding:22px; }
.grid{ gap:16px; }
.card, .stat{
  padding:16px;
  border-radius:18px;
}
.card{ overflow:hidden; }

/* prevent overflow everywhere */
.card, .stat, .table td, .table th{
  overflow-wrap:anywhere;
  word-break:break-word;
}
.table a{ overflow-wrap:anywhere; word-break:break-word; }

/* proof thumbnails (works for any img inside orders) */
.proof-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(110px,1fr));
  gap:8px;
  align-items:start;
}
.proof-thumb,
.proof-grid img,
img.proof-img,
.table img{
  width:100%;
  max-width:160px;
  height:auto;
  max-height:140px;
  object-fit:cover;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  cursor:zoom-in;
  display:block;
}

/* actions wrap nicely */
.actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
.actions .btn{
  padding:8px 10px;
  font-size:12px;
  white-space:nowrap;
}

/* inputs/buttons don't stretch weirdly */
.input, select{ min-width:0; }
input[type="file"]{
  max-width:100%;
  font-size:12px;
}

/* ====== breakpoints ====== */
@media (max-width: 900px){
  .container{ padding:16px; }
  .navbar{ flex-wrap:wrap; gap:10px; }
  .chart-wrap{ height:220px; }
}

@media (max-width: 700px){
  .grid{
    grid-template-columns:1fr !important;
    gap:12px;
  }
  .stat .value{ font-size:20px; }
  .card h3, .card h4{ font-size:16px; }

  /* Turn .table into stacked cards on mobile */
  .table thead{ display:none; }
  .table, .table tbody, .table tr, .table td{ display:block; width:100%; }

  .table tr{
    background:var(--bg-soft);
    border:1px solid rgba(255,255,255,.06);
    border-radius:14px;
    padding:10px 12px;
    margin-bottom:10px;
    box-shadow:var(--shadow);
  }

  .table td{
    border:none !important;
    padding:6px 0 !important;
    display:flex;
    justify-content:space-between;
    gap:12px;
    text-align:left;
  }

  /* label from data-label */
  .table td::before{
    content: attr(data-label);
    font-size:12px;
    color:var(--muted);
    flex:0 0 38%;
    max-width:38%;
    padding-right:6px;
  }

  .table td > *{ flex:1; min-width:0; }

  /* proof blocks don't take full width */
  .proof-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width: 420px){
  .btn{ padding:8px 10px; font-size:12px; }
  .input{ font-size:13px; }
  .proof-thumb,
  .proof-grid img,
  img.proof-img,
  .table img{
    max-width:120px;
    max-height:110px;
  }
}

/* =========================================
   HOTFIX RESPONSIVE OPERATOR + PROOFS
   paste at the VERY END of premium.css
========================================= */

/* stop horizontal scroll caused by tables/images */
html, body { max-width:100%; overflow-x:hidden; }
.table { width:100%; table-layout:fixed; }
.table th, .table td{
  overflow-wrap:anywhere;
  word-break:break-word;
  min-width:0;
}

/* ===== PROOFS: works with your current HTML ===== */
/* turn proof columns into a responsive grid */
.proof-col,
.proof-grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fit, minmax(120px, 1fr));
  gap:8px;
  align-items:start;
  width:100%;
  max-width:100%;
}
.proof-item{ min-width:0; }

/* universal thumb limiter */
.thumb,
.proof-thumb,
.proof-img,
.proof-grid img,
.proof-col img,
.table img{
  width:100% !important;
  max-width:150px !important;   /* desktop cap */
  height:auto !important;
  max-height:140px !important;
  object-fit:cover;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  display:block;
}

/* file inputs never stretch */
input[type="file"]{
  max-width:100%;
  font-size:12px;
}

/* actions wrap instead of pushing width */
.actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  width:100%;
}
.actions .btn{
  white-space:nowrap;
  font-size:12px;
  padding:8px 10px;
}

/* cards / stats spacing on mobile */
@media (max-width: 900px){
  .container{ padding:16px; }
  .grid{ gap:14px; }
  .card, .stat{ padding:14px; }
}

@media (max-width: 700px){
  .grid{ grid-template-columns:1fr !important; gap:12px; }
  .card, .stat{ padding:12px; border-radius:16px; }

  /* smaller thumbs in mobile */
  .thumb,
  .proof-thumb,
  .proof-img,
  .proof-grid img,
  .proof-col img,
  .table img{
    max-width:120px !important;
    max-height:110px !important;
  }

  /* proofs always 2 columns in mobile */
  .proof-col,
  .proof-grid{
    grid-template-columns:repeat(2, minmax(0,1fr)) !important;
  }
}

@media (max-width: 420px){
  .thumb,
  .proof-thumb,
  .proof-img,
  .proof-grid img,
  .proof-col img,
  .table img{
    max-width:96px !important;
    max-height:96px !important;
  }
}

.proof-wrap{
  position:relative;
  display:inline-block;
  max-width:150px;
}
.proof-del-form{
  position:absolute;
  top:6px;
  right:6px;
}
.proof-del-btn{
  width:24px;
  height:24px;
  border-radius:999px;
  border:0;
  cursor:pointer;
  font-weight:700;
  line-height:24px;
  background:rgba(0,0,0,.75);
  color:#fff;
  box-shadow:0 2px 6px rgba(0,0,0,.45);
}
