/* ── SynaPro — dark theme ────────────────────────────────────── */

/* ── Variables ── */
:root {
  --bg:         #0b0e14;
  --bg2:        #11151f;
  --bg3:        #1a1f2e;
  --border:     #242b3d;

  --purple:     #a78bfa;
  --cyan:       #22d3ee;
  --accent:     linear-gradient(135deg, #7c3aed, #22d3ee);

  --green:      #4ade80;
  --red:        #f87171;
  --amber:      #fbbf24;

  --text:       #f1f5f9;
  --text2:      #94a3b8;
  --text3:      #64748b;
  --text-muted: #64748b;

  --purple-bg:  #2e1065;
  --purple-bd:  #5b21b6;
  --green-bg:   #052e16;
  --green-bd:   #166534;
  --red-bg:     #2d0d0d;
  --red-bd:     #7f1d1d;

  --radius:    8px;
  --radius-lg: 12px;
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

a       { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── App layout — sidebar e topbar fissi, solo .content scrolla ── */
.app-shell  { display: flex; height: 100vh; overflow: hidden; }
.sidebar    { width: 200px; flex-shrink: 0; background: var(--bg2);
              border-right: 0.5px solid var(--border);
              display: flex; flex-direction: column;
              height: 100vh; overflow-y: auto; }
.main-area  { flex: 1; min-width: 0; display: flex; flex-direction: column;
              height: 100vh; overflow: hidden; }
.topbar     { background: var(--bg2); border-bottom: 0.5px solid var(--border);
              padding: 10px 20px; display: flex; align-items: center;
              justify-content: space-between; gap: 12px; flex-shrink: 0; }
.content    { padding: 20px; flex: 1; overflow-y: auto; }

/* ── Sidebar ── */
.sidebar-logo    { padding: 16px; font-size: 15px; font-weight: 500;
                   color: var(--purple); border-bottom: 0.5px solid var(--border); }
.sidebar-section { font-size: 10px; color: var(--text3); padding: 10px 16px 3px;
                   text-transform: uppercase; letter-spacing: .05em; }
.sidebar-item    { display: flex; align-items: center; gap: 8px;
                   padding: 7px 16px; font-size: 13px; color: var(--text2);
                   cursor: pointer; text-decoration: none; transition: background .15s; }
.sidebar-item:hover  { background: var(--bg3); color: var(--cyan); text-decoration: none; }
.sidebar-item.active { background: rgba(167, 139, 250, 0.1); color: var(--purple);
                       border-left: 3px solid var(--purple); padding-left: 13px; }
.sidebar-footer  { margin-top: auto; padding: 12px; }

.user-card { display: flex; align-items: center; gap: 8px;
             padding: 8px; background: var(--bg3); border-radius: var(--radius); }
.avatar    { width: 28px; height: 28px; border-radius: 50%; background: var(--purple-bg);
             display: flex; align-items: center; justify-content: center;
             font-size: 11px; color: var(--purple); font-weight: 500; flex-shrink: 0; }
.user-name { font-size: 12px; font-weight: 500; }
.user-role { font-size: 10px; color: var(--text3); }

/* ── Topbar ── */
.topbar-title { font-size: 14px; font-weight: 500; }
.topbar-left  { display: flex; align-items: center; gap: 8px; }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.breadcrumb   { font-size: 12px; color: var(--text3); }
.breadcrumb a { color: var(--text3); }
.breadcrumb a:hover { color: var(--text2); }
.sep          { color: var(--border); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--bg3); border: 0.5px solid var(--border);
  color: var(--text); padding: 5px 14px; border-radius: var(--radius);
  cursor: pointer; font-size: 12px; font-family: inherit;
  text-decoration: none; transition: background .15s;
}
.btn:hover         { background: var(--border); text-decoration: none; }
.btn-primary       { background: linear-gradient(135deg, #a78bfa 0%, #22d3ee 100%);
                     border: none; color: #0b0e14; font-weight: 700;
                     box-shadow: 0 4px 15px rgba(34,211,238,0.2); }
.btn-primary:hover { filter: brightness(1.1);
                     box-shadow: 0 6px 20px rgba(34,211,238,0.4);
                     transform: translateY(-1px); }
.btn-danger        { color: var(--red); border-color: var(--red-bd); }
.btn-danger:hover  { background: var(--red-bg); }
.btn-sm            { padding: 3px 10px; font-size: 11px; }

/* ── Cards ── */
.card        { background: var(--bg2); border: 0.5px solid var(--border);
               border-radius: var(--radius-lg); padding: 16px; }
.card + .card { margin-top: 10px; }
.card-title  { font-size: 11px; color: var(--text3); font-weight: 500;
               text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px; }

/* ── Stat boxes ── */
.stat-grid   { display: grid; gap: 10px; margin-bottom: 16px; }
.stat-grid-4 { grid-template-columns: repeat(4, 1fr); }
.stat-grid-5 { grid-template-columns: repeat(5, 1fr); }
.stat-box    { background: #1a2040; border-radius: var(--radius); padding: 12px; }
.stat-label  { font-size: 11px; color: var(--text3); margin-bottom: 3px; }
.stat-value  { font-size: 22px; font-weight: 500; line-height: 1.2; }
.stat-sub    { font-size: 11px; color: var(--text3); margin-top: 2px; }
.green { color: var(--green); }
.red   { color: var(--red); }
.amber { color: var(--amber); }

/* ── Badges ── */
.badge         { display: inline-block; padding: 2px 9px; border-radius: 20px;
                 font-size: 11px; font-weight: 500; }
.badge-win     { background: rgba(34,211,238,0.1); color: var(--cyan);
                 border: 1px solid rgba(34,211,238,0.3); }
.badge-loss    { background: rgba(248,113,113,0.1); color: var(--red);
                 border: 1px solid rgba(248,113,113,0.3); }
.badge-be      { background: #1c1917; color: #a8a29e; border: 0.5px solid #44403c; }
.badge-shared  { background: var(--green-bg); color: var(--green);
                 border: 0.5px solid var(--green-bd); }
.badge-private { background: var(--bg3); color: var(--text3);
                 border: 0.5px solid var(--border); }
.badge-admin   { background: var(--purple-bg); color: var(--purple);
                 border: 0.5px solid var(--purple-bd); }

/* ── Pills ── */
.pill        { display: inline-flex; align-items: center; background: var(--bg3);
               border: 0.5px solid var(--border); border-radius: 5px;
               padding: 2px 8px; font-size: 11px; color: var(--text2); }
.pill-purple { background: var(--purple-bg); border-color: var(--purple-bd); color: var(--purple); }
.pill-green  { background: var(--green-bg);  border-color: var(--green-bd);  color: var(--green); }
.pill-red    { background: var(--red-bg);    border-color: var(--red-bd);    color: var(--red); }

/* ── Forms ── */
.form-group   { margin-bottom: 12px; }
.form-label   { display: block; font-size: 11px; color: var(--text3); margin-bottom: 4px; }
.form-control {
  width: 100%; background: rgba(15,17,23,0.8);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 7px 10px; color: var(--text);
  font-size: 13px; font-family: inherit; transition: all 0.25s ease;
}
.form-control:focus   { outline: none; border-color: var(--purple);
                        box-shadow: 0 0 0 3px rgba(167,139,250,0.2);
                        background: rgba(15,17,23,1); }
select.form-control   { color: var(--text2); }
textarea.form-control { resize: vertical; min-height: 70px; }

/* ── Radio / YN buttons ── */
.radio-group { display: flex; gap: 4px; flex-wrap: wrap; }
.radio-opt, .yn-btn {
  background: var(--bg); border: 0.5px solid var(--border);
  border-radius: 5px; padding: 3px 11px; font-size: 12px;
  cursor: pointer; color: var(--text3); transition: all .15s; user-select: none;
}
.radio-opt:hover, .yn-btn:hover { border-color: var(--purple-bd); color: var(--text); }
.radio-opt.active    { background: var(--purple-bg); border-color: var(--purple-bd); color: var(--purple); }
.yn-btn.yes          { background: rgba(34,211,238,0.1); color: var(--cyan);
                       border: 1px solid rgba(34,211,238,0.3); }
.yn-btn.no           { background: rgba(248,113,113,0.1); color: var(--red);
                       border: 1px solid rgba(248,113,113,0.3); }
.yn-btn.long-active,  .btn.long-active  { background: var(--green-bg);
                                          border-color: var(--green-bd); color: var(--green); }
.yn-btn.short-active, .btn.short-active { background: var(--red-bg);
                                          border-color: var(--red-bd);  color: var(--red); }

/* ── Trade table ── */
.trade-table      { width: 100%; border-collapse: collapse; }
.trade-table th   { font-size: 11px; color: var(--text3); font-weight: 500;
                    padding: 6px 8px; border-bottom: 0.5px solid var(--border); text-align: left; }
.trade-table td   { padding: 8px; border-bottom: 0.5px solid var(--bg3);
                    font-size: 12px; vertical-align: middle; }
.trade-table tr:hover td      { background: #1a2040; }
.trade-table tr:last-child td { border-bottom: none; }
.trade-table a    { color: var(--text); text-decoration: none; }

/* ── Field row (dettaglio trade) ── */
.field-row          { display: flex; justify-content: space-between; align-items: center;
                      padding: 5px 0; border-bottom: 0.5px solid var(--bg3); font-size: 12px; }
.field-row:last-child { border-bottom: none; }
.field-key          { color: var(--text3); }
.field-val          { color: var(--text); font-weight: 500; }
.field-val.ok       { color: var(--green); }
.field-val.no       { color: var(--text3); }

/* ── Screenshot area ── */
.screenshot-tabs  { display: flex; gap: 2px; background: var(--bg);
                    border-radius: var(--radius); padding: 3px; margin-bottom: 10px; }
.scr-tab          { padding: 5px 12px; border-radius: 5px; cursor: pointer;
                    font-size: 12px; color: var(--text3); transition: all .15s; }
.scr-tab.active   { background: var(--bg3); color: var(--text); }
.screenshot-frame { background: var(--bg3); border: 0.5px solid var(--border);
                    border-radius: var(--radius); min-height: 200px;
                    display: flex; align-items: center; justify-content: center; }
.screenshot-frame img { max-width: 100%; border-radius: var(--radius); display: block; }
.drop-zone        { border: 0.5px dashed var(--border); border-radius: var(--radius);
                    padding: 14px; text-align: center; cursor: pointer;
                    color: var(--text3); font-size: 12px; transition: border-color .15s; }
.drop-zone:hover  { border-color: var(--purple-bd); color: var(--text2); }
.drop-zone.loaded { border-color: var(--green-bd); border-style: solid; }
.url-row          { display: flex; gap: 6px; margin-top: 6px; }
.url-row .form-control { flex: 1; }

/* ── Insight ── */
.insight        { background: #1a2040; border-radius: var(--radius); padding: 10px 14px;
                  margin-bottom: 6px; border-left: 2px solid var(--purple); }
.insight.warn   { border-left-color: var(--amber); }
.insight.danger { border-left-color: var(--red); }
.insight-label  { font-size: 11px; color: var(--purple); margin-bottom: 2px; }
.insight.warn   .insight-label { color: var(--amber); }
.insight.danger .insight-label { color: var(--red); }
.insight-val    { font-size: 13px; color: var(--text); }

/* ── Flash messages ── */
.flash-list           { list-style: none; padding: 0 20px; margin-top: 10px; }
.flash-item           { padding: 8px 14px; border-radius: var(--radius);
                        margin-bottom: 6px; font-size: 13px; border: 0.5px solid; }
.flash-item.success   { background: var(--green-bg); color: var(--green); border-color: var(--green-bd); }
.flash-item.danger    { background: var(--red-bg);   color: var(--red);   border-color: var(--red-bd); }
.flash-item.info      { background: var(--bg3); color: var(--text2); border-color: var(--border); }
.flash-item.warning   { background: #1c1507; color: var(--amber); border-color: #78350f; }
.flash-list-container { margin-bottom: 12px; }

/* ── Utilities ── */
.grid-2     { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3     { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.mt-10      { margin-top: 10px; }
.mt-16      { margin-top: 16px; }
.mb-10      { margin-bottom: 10px; }
.divider    { border: none; border-top: 0.5px solid var(--border); margin: 12px 0; }
.text-muted { color: var(--text3); }
.text-sm    { font-size: 12px; }
.w-100      { width: 100%; }
.tag-list   { display: flex; flex-wrap: wrap; gap: 5px; }

/* ── Rich text output (Quill) ── */
.squad-rich-text ul,
.squad-rich-text ol { padding-left: 1.4em; }
.squad-rich-text li { margin-bottom: 2px; }

/* ── Auth pages (login, register, reset) ─────────────────────── */
/* Tutti gli stili auth sono isolati dentro .login-wrap            */

.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(rgba(15,17,23,0), rgba(15,17,23,0)),
              url('../img/auth-bg.webp');
  background-size: cover; background-position: center;
  position: relative;
}
.login-wrap::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10,12,18,0.5);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  z-index: 1;
}
.login-wrap > div {
  position: relative; z-index: 2;
  width: 100%; max-width: 420px; padding: 24px;
}

/* Card glassmorphism — solo nelle pagine auth */
.login-wrap .card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(167,139,250,0.3);
  box-shadow: 0 0 20px rgba(167,139,250,0.1), 0 20px 50px rgba(0,0,0,0.6);
}

.auth-logo-section  { text-align: center; margin-bottom: 35px; }
.logo-wrapper       { display: flex; align-items: center; justify-content: center;
                      gap: 15px; margin-bottom: 5px; }
.auth-logo-img      { height: 45px; width: auto;
                      filter: drop-shadow(0 0 12px rgba(167,139,250,0.4)); }
.logo-brand         { font-size: 32px; font-weight: 700; letter-spacing: -0.5px;
                      color: #ffffff; line-height: 1; }
.logo-brand .highlight { background: linear-gradient(135deg, #a78bfa, #22d3ee);
                         -webkit-background-clip: text; -webkit-text-fill-color: transparent;
                         margin-left: 2px; }
.logo-sub           { font-size: 11px; font-weight: 400; color: rgba(255,255,255,0.5);
                      letter-spacing: 2px; text-transform: uppercase; margin-top: 5px; }
.card-content-title { font-size: 16px; font-weight: 500; margin-bottom: 20px; }
.card-subtitle      { font-size: 13px; color: var(--text3); margin-bottom: 20px; }
.auth-footer-links  { text-align: center; margin-top: 16px;
                      font-size: 12px; color: var(--text3); }
