/* BrandBlues SEO Console Stylesheet */
:root {
  --ink: #014aad;
  --ink2: #013d90;
  --berry: #014aad;
  --gold: #014aad;
  --canvas: #F4F7FB;
  --card: #fff;
  --line: #E2E8F2;
  --line2: #EEF2F8;
  --text: #16223A;
  --muted: #6B7891;
  --green: #27AE60; /* Adjusted to actual green for success/wins */
  --greenbg: #E8F8F0;
  --red: #C0392B;
  --redbg: #FBEAEE;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Outfit', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--sans);
  background: var(--canvas);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar styling */
.side {
  width: 236px;
  background: var(--ink);
  color: #fff;
  flex: none;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  padding: 20px 22px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand .mk {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 4px;
  flex: none;
  font-weight: 700;
  color: var(--ink);
  font-size: 18px;
}

.brand .mk img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand .nm {
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
}

.brand .nm small {
  display: block;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #AFC6E8;
  font-weight: 600;
  margin-top: 3px;
}

.proto {
  margin: 0 22px 14px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #014aad;
  background: #fff;
  display: inline-block;
  padding: 3px 9px;
  border-radius: 5px;
  align-self: flex-start;
}

.nav {
  padding: 6px 12px;
  flex: 1;
  overflow-y: auto;
}

.nav .lbl {
  font-size: 9.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #9DB4D6;
  padding: 12px 10px 6px;
  font-weight: 600;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 9px;
  color: #D6E3F5;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 2px;
  text-decoration: none;
  transition: all 0.2s;
}

.nav a .ic {
  width: 18px;
  text-align: center;
  font-size: 14px;
  opacity: .9;
}

.nav a:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}

.nav a.on {
  background: rgba(255,255,255,.18);
  color: #fff;
}

.acct {
  margin: 12px;
  padding: 12px;
  background: rgba(255,255,255,.05);
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.acct .av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  color: #014aad;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}

.acct .who {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.acct .who small {
  display: block;
  color: #9DB4D6;
  font-weight: 400;
  font-size: 10.5px;
}

/* Main content styling */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.top {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 12px 26px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.client {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
}

.client .logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, #014aad, #013d90);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

.client .ca {
  color: var(--muted);
  font-size: 11px;
}

.pill {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
}

.pill .g {
  color: var(--muted);
}

.top .search {
  margin-left: auto;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12.5px;
  color: var(--muted);
  width: 180px;
}

.btn {
  background: var(--berry);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 15px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.9;
}

.btn.gold {
  background: #fff;
  color: #014aad;
  border: 1px solid #B9CCEA;
}

.bell {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 15px;
  position: relative;
  text-decoration: none;
}

.bell i {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 7px;
  height: 7px;
  background: var(--red);
  border-radius: 50%;
}

.canvas {
  padding: 24px 26px;
  flex: 1;
}

.view {
  display: none;
}

.view.on {
  display: block;
}

.vh {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
}

.vh h1 {
  font-family: var(--serif);
  font-size: 23px;
  color: var(--ink);
  font-weight: 600;
}

.vh p {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 16px 18px;
}

.kpi .k {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--muted);
  margin-bottom: 8px;
}

.kpi .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.kpi .v {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.kpi .v small {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  font-family: var(--sans);
}

.delta {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.delta.up {
  color: var(--green);
  background: var(--greenbg);
}

.delta.dn {
  color: var(--red);
  background: var(--redbg);
}

.kpi .from {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 7px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 14px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 18px 20px;
  margin-bottom: 14px;
}

.panel h3 {
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 3px;
}

.panel h3 .r {
  float: right;
  font-weight: 500;
  color: var(--muted);
  font-size: 11px;
}

.panel .csub {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.feed .f {
  display: flex;
  gap: 11px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line2);
  font-size: 12.5px;
}

.feed .f:last-child {
  border: none;
}

.feed .dot {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 12px;
}

.feed .g {
  background: var(--greenbg);
  color: var(--green);
}

.feed .b {
  background: #E8F0FB;
  color: var(--ink);
}

.feed .y {
  background: #EEF2F8;
  color: #E2B13C;
}

.feed .ft b {
  color: var(--ink);
  font-weight: 600;
}

.feed .ft small {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  margin-top: 1px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

th {
  text-align: left;
  font-size: 10px;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 0 10px 10px;
  border-bottom: 1px solid var(--line);
}

th.r, td.r {
  text-align: right;
}

td {
  padding: 10px;
  border-bottom: 1px solid var(--line2);
  color: #16223A;
}

tr:last-child td {
  border-bottom: none;
}

td.kw {
  font-weight: 600;
  color: var(--ink);
}

.rank {
  display: inline-block;
  min-width: 32px;
  text-align: center;
  border-radius: 6px;
  padding: 3px 0;
  font-weight: 700;
  font-size: 11.5px;
}

.rank.top {
  background: var(--greenbg);
  color: var(--green);
}

.rank.mid {
  background: #EEF2F8;
  color: var(--ink);
}

.chg {
  font-weight: 700;
  font-size: 11.5px;
}

.tagp {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
}

.tagp.pub {
  background: var(--greenbg);
  color: var(--green);
}

.tagp.da {
  background: #E8F0FB;
  color: var(--berry);
}

.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.filters .fp {
  font-size: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.filters .fp.on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.filters .sr {
  margin-left: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--muted);
  width: 200px;
  outline: none;
}

.filters .sr:focus {
  border-color: var(--ink);
}

a.ext {
  color: var(--berry);
  font-weight: 600;
  text-decoration: none;
  font-size: 11.5px;
}

.rep {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.repc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 18px;
  text-align: center;
}

.repc .ic {
  font-size: 26px;
  margin-bottom: 8px;
}

.repc h4 {
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 4px;
}

.repc p {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

@media(max-width:820px) {
  .side {
    display: none;
  }
  .kpis, .rep {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .top .search {
    display: none;
  }
}

/* Custom Login UI Style */
.login-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 8px 30px rgba(1, 74, 173, 0.05);
}

.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: var(--canvas);
}

.login-logo {
  text-align: center;
  margin-bottom: 25px;
}

.login-logo .mk {
  display: inline-block;
  background: white;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  margin-bottom: 10px;
  border: 1px solid #eef2f6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  box-sizing: border-box;
  padding: 4px;
}

.login-logo h2 {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
}

.login-error {
  background: var(--redbg);
  color: var(--red);
  font-size: 12.5px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #FDE8E8;
  margin-bottom: 18px;
  font-weight: 500;
  text-align: center;
}
