/* LittleDrops — Dashboard Styles */
:root {
  --bg:        #0d1117;
  --surface:   #161b22;
  --surface2:  #1f2937;
  --border:    #30363d;
  --text:      #e6edf3;
  --muted:     #8b949e;
  --buy:       #1d6fdb;
  --buy-light: #388bfd;
  --sell:      #c0392b;
  --sell-light:#e74c3c;
  --green:     #2ea043;
  --red:       #da3633;
  --gold:      #d4a017;
  --radius:    6px;
  --shadow:    0 2px 8px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', Arial, sans-serif; font-size: 14px; }

/* LOGIN */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
             padding: 40px; width: 100%; max-width: 360px; box-shadow: var(--shadow); }
.login-logo { font-size: 28px; font-weight: 700; text-align: center; color: var(--buy-light); margin-bottom: 4px; }
.login-sub  { text-align: center; color: var(--muted); margin-bottom: 28px; font-size: 13px; }

/* TOPBAR */
.topbar { display: flex; justify-content: space-between; align-items: center;
          background: var(--surface); border-bottom: 1px solid var(--border);
          padding: 10px 20px; position: sticky; top: 0; z-index: 100; }
.topbar-left { display: flex; align-items: center; gap: 14px; }
.logo { font-size: 18px; font-weight: 700; color: var(--buy-light); }
.user-tag { color: var(--muted); font-size: 13px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

/* ACCOUNTS OVERVIEW PAGE */
.accounts-page { max-width: 1100px; margin: 0 auto; padding: 24px 20px; }
.page-title { font-size: 20px; margin-bottom: 18px; }
.accounts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.account-card { display: block; background: var(--surface); border: 1px solid var(--border);
                border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--text);
                transition: border-color 0.15s, transform 0.1s; }
.account-card:hover { border-color: var(--buy-light); transform: translateY(-1px); }
.account-card.offline { opacity: 0.65; }
.account-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.account-name { font-size: 16px; font-weight: 700; }
.account-firm { color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.account-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 12px; }
.account-stats label { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; margin-bottom: 2px; }
.account-stats span { font-size: 14px; font-weight: 600; }
.account-consensus { text-align: center; padding: 6px; border-radius: var(--radius); font-size: 12px; font-weight: 600; }
.account-consensus.ok  { background: #0f2d1a; color: var(--green); }
.account-consensus.bad { background: #2d0f0f; color: var(--red); }

/* CONSENSUS BANNER */
.consensus-banner { padding: 10px 20px; text-align: center; font-weight: 600; font-size: 14px; }
.consensus-ok  { background: #0f2d1a; color: #2ea043; border-bottom: 1px solid #2ea043; }
.consensus-bad { background: #2d0f0f; color: #e74c3c; border-bottom: 1px solid #e74c3c; }

/* ACCOUNT STRIP (detail page) */
.account-strip { display: flex; flex-wrap: wrap; gap: 2px; background: var(--border);
                 border-bottom: 1px solid var(--border); }
.acct-card { background: var(--surface2); flex: 1; min-width: 120px; padding: 10px 16px; }
.acct-card label { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase;
                   letter-spacing: 0.5px; margin-bottom: 4px; }
.acct-card span { font-size: 15px; font-weight: 600; }
.pl-value.positive { color: var(--green); }
.pl-value.negative { color: var(--red); }

/* MAIN GRID */
.main-grid { display: grid; grid-template-columns: 300px 1fr; gap: 0; min-height: calc(100vh - 130px); }

.controls-panel { background: var(--surface); border-right: 1px solid var(--border);
                  overflow-y: auto; padding-bottom: 40px; }
.panel-section { padding: 16px; border-bottom: 1px solid var(--border); }
.panel-section h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
                    color: var(--muted); margin-bottom: 12px; }

.positions-panel { padding: 16px; overflow-y: auto; }
.positions-section { margin-bottom: 28px; }
.positions-section h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px;
                        display: flex; align-items: center; gap: 8px; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { background: var(--surface2); padding: 8px 10px; text-align: left;
     color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
td { padding: 8px 10px; border-top: 1px solid var(--border); }
tr:hover td { background: rgba(255,255,255,0.03); }
.no-data { text-align: center; color: var(--muted); padding: 24px !important; }
.pl-pos { color: var(--green); font-weight: 600; }
.pl-neg { color: var(--red); font-weight: 600; }

/* FORMS */
.form-group { margin-bottom: 16px; }
.form-group label, .form-row label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.form-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.form-row label { margin: 0; flex: 1; }
.form-row input, .form-row select { flex: 0 0 100px; }
input[type=text], input[type=password], input[type=number], select {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); padding: 7px 10px; font-size: 13px; width: 100%; }
input:focus, select:focus { outline: none; border-color: var(--buy); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center;
       padding: 8px 14px; border-radius: var(--radius); border: none; cursor: pointer;
       font-size: 13px; font-weight: 600; transition: opacity 0.15s; white-space: nowrap; }
.btn:hover { opacity: 0.85; }
.btn-full   { width: 100%; margin-bottom: 6px; }
.btn-primary { background: var(--buy); color: #fff; }
.btn-danger  { background: var(--red); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-buy     { background: var(--buy); color: #fff; }
.btn-sell    { background: var(--sell); color: #fff; }
.btn-allow   { background: var(--green); color: #fff; flex: 1; }
.btn-block   { background: var(--red); color: #fff; flex: 1; }
.btn-sm      { padding: 5px 10px; font-size: 12px; }
.btn-row     { display: flex; gap: 6px; margin-bottom: 6px; }
.btn-row .btn { flex: 1; }
.trade-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

/* VOTE */
.vote-row   { margin-bottom: 10px; }
.vote-item  { display: flex; justify-content: space-between; align-items: center;
              padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.vote-allow { color: var(--green); font-weight: 600; }
.vote-block { color: var(--red); font-weight: 600; }
.vote-buttons { display: flex; gap: 6px; }

/* BADGES */
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-online  { background: var(--green); color: #fff; }
.badge-offline { background: var(--muted); color: #fff; }
.badge-buy     { background: var(--buy); color: #fff; }
.badge-sell    { background: var(--sell); color: #fff; }

/* ALERTS */
.alert { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13px; }
.alert-error { background: #2d0f0f; border: 1px solid var(--red); color: #e74c3c; }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7);
                 display: flex; align-items: center; justify-content: center; z-index: 999; }
.modal-overlay.hidden { display: none; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
         padding: 28px; max-width: 380px; width: 90%; box-shadow: var(--shadow); }
.modal h3 { margin-bottom: 12px; }
.modal p  { color: var(--muted); margin-bottom: 20px; line-height: 1.6; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .main-grid { grid-template-columns: 1fr; }
  .controls-panel { border-right: none; border-bottom: 1px solid var(--border); }
  .account-strip .acct-card { min-width: 45%; }
  .trade-buttons { grid-template-columns: 1fr; }
  .accounts-grid { grid-template-columns: 1fr; }
}
