:root {
  --left-w: 72px;
  --right-w: 300px;
  --accent: #FF6A00;
  --accent-light: #FFA34D;
  --bg-dark: #1A1A1A;
  --panel-dark: #2B2B2B;
  --panel-mid: #3C3C3C;
  --text-light: #E6E6E6;
  --muted: #C0C0C0;
  --white: #FFFFFF;
  --radius: 12px;
}

body {
  margin:0;
  min-height:100vh;
  font-family: 'Cairo', sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
}

h1,h2,h3,h4,h5 { font-family: 'IM Fell Double Pica SC', serif; color: var(--white); }

.app {
  min-height:100vh;
  display:flex;
  gap:18px;
}

/* LEFT NAV */
.left-nav {
  width: 65px;
  background: #1A1A1A;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  color: #E6E6E6;
  padding:14px 10px 0 8px;
}

.logo img { 
  width:54px;
  height:54px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom: 25px;
padding-left: 15px;
}

/* Dashboard Navigation */
.nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    padding-left: 15px;
}

.nav-item {
    position: relative;
    display: inline-block;
}

.nav-btn {
    --size: 48px;
    width: var(--size);
    height: var(--size);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    color: var(--muted);
    font-size: 26px;
    cursor: pointer;
    transition: all .2s ease;
}

    .nav-btn:hover {
        color: var(--white);
        background: var(--panel-mid);
    }

    .nav-btn.active {
        color: var(--white);
        background: var(--accent);
    }

/* Keyword Counter */
.keyword-counter { 
  width: 100%; 
  text-align: center; 
  padding: 0.6rem 0; 
  font-size: 0.85rem; 
  color: #C0C0C0; 
  padding-left: 15px;
}

.keyword-counter span { 
  color: #FF6A00; 
  font-weight: bold; 
}

.keyword-progress { 
  width: 80%; 
  height: 6px; 
  background: #3C3C3C; 
  border-radius: 3px; 
  margin: 6px auto 0; 
  overflow: hidden; 
}

.keyword-progress #keyword-progress-bar { 
  height: 100%; 
  width: 0%; 
  background: linear-gradient(90deg, #FF6A00, #FFA34D); 
  border-radius: 3px; 
  transition: width 0.6s ease, box-shadow 0.3s ease; 
}

.keyword-progress #keyword-progress-bar.glow { 
  box-shadow: 0 0 12px 2px #FF6A00, 0 0 20px 4px #FFA34D; 
}

/* Sidebar Logout Option */
.sidebar-logout {
    margin: 20px;
    text-align: center;
}

    .sidebar-logout .account-btn {
        margin: 0 0 0 20px;
        padding: 10px 18px;
        background-color: #FF6A00;
        color: #fff;
        border: none;
        border-radius: 6px;
        font-size: 0.9rem;
        font-weight: 500;
        cursor: pointer;
        transition: background-color 0.2s ease, transform 0.15s ease;
    }

        .sidebar-logout .account-btn:hover {
            background-color: #e65a00; 
            transform: translateY(-1px);
        }

        .sidebar-logout .account-btn:active {
            transform: translateY(0);
            background-color: #cc4f00;
        }

/* MAIN */
.main { flex:1; display:flex; flex-direction:column; padding:20px; background: var(--panel-dark); }

/* Main Area Top Bar */
.topbar { 
  display:flex; 
  justify-content:space-between; 
  align-items:center; 
  margin-bottom:18px; 
}

.page-title { 
  margin:0;
  font-size:24px; 
}

/* Account menu */
.account-menu { 
  position: relative; 
  order: -1; /* keep it on top if row wraps */
  width: 100%;
  display: flex;
  justify-content: flex-end;
  font-family: 'Noto Sans', sans-serif; 
}
@media (max-width:768px){
  .account-menu { justify-content: flex-start; margin-bottom: 10px; }
}

.account-trigger { 
  background: #2b2b2b; 
  color: #fff; 
  border: 2px solid #ff6a00; 
  padding: 0.5rem 1rem; 
  border-radius: 50px; 
  display: flex; 
  align-items: center; 
  gap: 0.5rem; 
  cursor: pointer; 
  transition: background 0.3s, box-shadow 0.3s; 
}

.account-trigger .username { 
  font-weight: bold; 
  color: #ffb470; 
}

.account-dropdown { 
  position: absolute; 
  right: 0; 
  top: 110%; 
  background: #2b2b2b; 
  width: 250px; 
  border-radius: 12px; 
  box-shadow: 0 10px 30px rgba(0,0,0,0.7); 
  opacity: 0; 
  visibility: hidden; 
  transform: translateY(-10px); 
  transition: all 0.3s ease; 
  z-index: 999; 
}

.account-menu:hover .account-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.account-options { list-style: none; padding: 0.5rem 0; margin: 0; border-bottom: 1px solid #444; }
.account-options li a { display: block; padding: 0.75rem 1rem; color: #eee; text-decoration: none; transition: background 0.3s, color 0.3s; }
.account-options li a:hover { background: #ff6a00; color: #fff; border-radius: 8px; }

.btn { background: linear-gradient(90deg,var(--accent),var(--accent-light)); color: var(--white); border:0; padding:10px 16px; border-radius: var(--radius); cursor:pointer; font-weight:600; }

.panels { flex:1; overflow:auto; }
.panel { display:none; }
.panel.active { display:block; }

.cards { 
  display:flex; 
  gap:16px; 
  flex-wrap:wrap; 
  align-items:stretch; 
}
@media (max-width:900px){
  .cards { flex-direction: column; gap: 12px; }
  .card { flex: 1 1 100%; min-width: auto; }
}

.card {
  background: var(--panel-mid);
  box-shadow: 0 2px 5px 0 rgba(0,0,0,.26);
  border-radius:0 !important;
  position:relative;
  -webkit-transition:all .2s linear;
  padding:16px;
  flex:1;
  min-width:180px;
  min-height:120px;
}
.card h3 {
  font-size: 26px; 
  margin: 0 0 12px;
  color: var(--white);
}

#panel-dashboard .card:first-child h3 {
  margin-bottom: 6px;
}

#panel-dashboard .card:first-child .muted {
  margin-top: 0;
  margin-bottom: 12px;
}

.kpi.large-kpi {
  font-size: 3rem;
  font-weight: bold;
  color: #FF6A00; 
  margin-top: 4px;
}

/* Layout for table + clients */
.team-layout {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.team-table {
  flex: 2 1 600px;
}

.client-list {
  flex: 1 1 250px;
}

.client-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.client-list li {
  padding: 8px 0;
  border-bottom: 1px solid #2B2B2B;
}

/* Responsive table */
.responsive-table {
  width: 100%;
  border-collapse: collapse;
}

.responsive-table th,
.responsive-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #3C3C3C;
  text-align: left;
}

.responsive-table th {
  background: #1A1A1A;
  font-weight: 600;
}

/* Stack on mobile */
@media (max-width: 768px) {
  .team-layout {
    flex-direction: column;
  }
  .client-list {
    order: -1; /* move clients above table on mobile */
  }
  .responsive-table th,
  .responsive-table td {
    font-size: 14px;
  }
}

.kpi { font-size:22px;font-weight:700;color:var(--accent-light); }

.list { margin-top:16px; background: var(--panel-mid); box-shadow: 0 2px 5px 0 rgba(0,0,0,.26); border-radius:0 !important; position:relative; -webkit-transition:all .2s linear; padding:12px; }
.list-item { display:flex;justify-content:space-between; padding:8px 0;border-bottom:1px solid var(--bg-dark); }
.list-item:last-child{ border-bottom:0; }

/* KW module & inputs */
.kwmod-panel { background: var(--panel-mid); padding: 16px; }
.kwmod-textarea, .kwmod-input, .kwmod-select {
  width: 97%;
  background: var(--panel-dark);
  color: var(--text-light);
  border: 1px solid var(--panel-mid);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-family: 'Cairo', sans-serif;
}
.kwmod-row { display:flex; justify-content:space-between; margin-top:10px; gap:12px; }
.kwmod-btn {
  background: linear-gradient(90deg,var(--accent),var(--accent-light));
  color: var(--white);
  border:0;
  padding:8px 14px;
  border-radius: var(--radius);
  cursor:pointer;
}
.kwmod-btn.kwmod-secondary { background: var(--panel-dark); border:1px solid var(--accent); color: var(--accent-light); }

.kwmod-inline { display:flex; flex-wrap:wrap; gap: 5%; }
.kwmod-field label { display:flex; align-items:center; justify-content:space-between; font-size:14px; margin-bottom:4px; }
.kwmod-info { position:relative; cursor:pointer; margin-left:6px; }

/* Tooltip (shared style) */
.kwmod-tooltip {
    position: absolute;
    background: var(--panel-dark);
    color: var(--text-light);
    border: 1px solid var(--accent);
    padding: 10px;
    width: 220px;
    border-radius: var(--radius);
    z-index: 50;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.kwmod-tooltip {
    display: block; 
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.nav-item .kwmod-tooltip {
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    width: 280px; 
    background: var(--accent); 
    color: var(--white); 
    border: none; 
    padding: 8px 14px; 
    border-radius: 6px;
    font-size: 18px;
    font-weight: 500;
    white-space: nowrap; 
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

    .nav-item .kwmod-tooltip::before {
        content: "";
        position: absolute;
        left: -6px;
        top: 50%;
        transform: translateY(-50%);
        border-width: 6px;
        border-style: solid;
        border-color: transparent var(--accent) transparent transparent;
    }

.nav-item:hover .kwmod-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.kwmod-info {
    position: relative;
    display: inline-block;
}

    .kwmod-info:hover .kwmod-tooltip {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

/* Table Search */
.kwmod-table-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

#kwmod-search {
  flex: 1; /* Takes all remaining space */
  min-width: 200px;
}

.kwmod-table-top > div {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0; /* Keeps this section compact */
}

.kwmod-label.sm {
  white-space: nowrap;
}

.kwmod-table { 
  width:100%; 
  border-collapse:collapse; 
}

.kwmod-table th, .kwmod-table td { 
  padding:10px; 
  border-bottom:1px solid var(--panel-mid); 
  text-align:left; 
}

.kwmod-table th { 
  background:var(--panel-mid); 
  font-weight:600; 
}

.kwmod-pagination { 
  margin-top:12px; 
  display:flex; 
  justify-content:center; 
  gap:10px; 
  flex-wrap: wrap;
}

.kwmod-actions { 
  margin-top:16px; 
  display:flex; 
  gap:12px; 
}

#site-url { 
  flex:1; 
  min-width:260px; 
}

/* Right sidebar */
.right { 
  width:var(--right-w); 
  background: var(--panel-dark); 
  padding:18px; 
  display:flex; 
  flex-direction:column; 
  gap:12px; 
}
.account-promo {
  margin-top: auto;
}
.cta { background: linear-gradient(180deg,var(--accent),var(--accent-light)); color: var(--white); box-shadow: 0 2px 5px 0 rgba(0,0,0,.26); border-radius:0 !important; position:relative; -webkit-transition:all .2s linear; padding:14px; }
.cta h4{margin:0 0 8px; font-size: 20px;}
.cta a{color:var(--white);text-decoration:underline;}
.kb, .notes { background: var(--panel-mid); box-shadow: 0 2px 5px 0 rgba(0,0,0,.26); border-radius:0 !important; position:relative; -webkit-transition:all .2s linear; padding:12px; }
.kb h4,.notes {margin:0 0 8px; font-size: 20px;}
.kb a{color:var(--accent-light);text-decoration:none;}
.notes h4 {margin:0 0 8px; font-size: 20px;}
.notes textarea { width:92%; min-height:100px; background: var(--bg-dark); color: var(--text-light); border:1px solid var(--panel-dark); border-radius:var(--radius); padding:10px; font-family: 'Cairo', sans-serif; }

/* Social Promotion */
.social-links { 
  display: flex; 
  justify-content: center; 
  gap: 0.5rem; 
  margin-top: 0.5rem; 
}

.social-links a { 
  color: #ff6a00; 
  font-size: 2rem; 
  transition: transform 0.3s, color 0.3s; 
}

.social-links a:hover { 
  transform: translateY(-2px); 
  color: #ffa34d; 
}

.account-promo p {
  text-align: center;
  font-size: 1.2rem;
}

/* Bidding-specific styles */
.bid-counter { font-size:14px; color:var(--muted); }
.bid-progress { width:160px; height:8px; background: #3C3C3C; border-radius: 6px; overflow:hidden; margin-top:6px; }
#bid-progress-bar { height:100%; width:0%; background: linear-gradient(90deg,var(--accent),var(--accent-light)); transition: width .4s ease; }
#bid-progress-bar.near { box-shadow: 0 0 8px #FF6A00; }

/* Account Settings Panel Overrides */
.account-field {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
}
.account-field label {
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 14px;
}
.account-field input {
  background: var(--panel-dark);
  color: var(--text-light);
  border: 1px solid var(--panel-mid);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
}

.subscription-info p {
  margin: 4px 0;
  font-size: 14px;
}
.subscription-info button {
  margin-top: 8px;
}

.promo-card { position:relative; padding:0; overflow:hidden; display:flex; align-items:center; justify-content:center; min-height:260px; }
.promo-card .promo-img { width:100%; height:100%; object-fit:cover; display:block; }
.promo-card .promo-overlay { position:absolute; left:12px; bottom:12px; color:var(--white); text-shadow:0 2px 8px rgba(0,0,0,0.6); }
.muted { color:var(--muted); font-size:13px; }

/* responsive */
@media (max-width:900px){
  .cards { flex-direction:column; }
  .right { display:none; }
}