  /* Theme & reset */
    :root{
      --bg: linear-gradient(105deg,#07090a, #0a0909, #030202, #07090a);
      --panel:#0b0f14;
      --muted:#9aa6b3;
      --muted-2:#7d8790;
      --accent:#6c63ff;
      --accent-2:#06b6d4;
      --success:#10b981;
      --danger:#ff6b6b;
      --glass: rgba(255,255,255,0.02);
      --card-border: rgba(255,255,255,0.04);
      --radius:10px;
      --gap:14px;
      --text:#e6eef8;
      --small:13px;
      --input-bg: rgba(0, 0, 0, 0.486);
    }
   

    body{
      background:linear-gradient(135deg,#07090a, #141111, #080606);
      color:var(--text);
      font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial;
    }

    /* layout */
    /* ==== App Header ====*/
    .app-header{
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: linear-gradient(105deg,#07090a, #0a0909, #030202, #07090a);
      padding: 16px 24px;
      border-bottom: 1px solid #313131;
      margin-left: -18px;
      margin-right: -18px;
      margin-top: -18px;
      color: #fff;
      flex-wrap: wrap;
      gap: 16px;

    }
    .logo {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.logo .mark {
  font-size: 1px;
  font-weight: bold;
  background: transparent;
  color: #fff;
  padding: 2px 2px;
  border-radius: 6px;
}
.header-bars-btn{
        background-color: transparent;
        border: none;
        cursor: pointer;
        font-size: 25px;
        color: #8b8b8b;
        border: 1px solid #313131;
        border-radius: 5px;
}
.header-bars-btn:hover{
  background: #141111;
}
.logo h1 {
  margin: 0;
  font-size: 20px;
}

.logo .subtitle {
  font-size: 14px;
  color: #a8b5c6;
}
.user-utilities{
  display: flex;
}
.header-btn{
  background: transparent;
  color: #a8b5c6;
  border: 1px solid #313131;
  border-radius: 6px;
  padding-right: 5px;
  font-size: 1.33rem;
  justify-content: space-between;
  cursor: pointer;
}
.header-btn:hover{
  background: #444;
}
.header-plus, .header-notic, .header-ticket, .header-mss {
  margin-right: 5px;
}
     .search-box {
      padding: 2px 4px;
      font-size: 20px;
      background: transparent;
      border: 1px solid #313131;
      color: #8b8b8b;
      border-radius: 6px;
      width: 200px;
      margin-right: -50px;
    }
    .h-search-btn{
      margin-right: 0.5rem;
      color: #333;
    }

    .h-search-button:hover {
      background-color: #0056b3;
    }
.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-user-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #192234, #0b1220);
  display: grid;
  place-items: center;
}

.header-nav-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: -10px;
 
}

.first-header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

/*___________________/*/
.app-container{
  margin-left: 2rem;
  margin-right: 2rem;
}
    /* SIDEBAR */
    .sidebar{
      background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
      border:1px solid var(--card-border);
      padding:14px;
      border-radius:var(--radius);
      height:calc(100vh - 96px);
      overflow:auto;
    }
    .account{
      display:flex;gap:12px;align-items:center;margin-bottom:12px;
    }
    .avatar{width:46px;height:46px;border-radius:10px;background:linear-gradient(135deg,#1d2640,#101426);display:inline-grid;place-items:center;font-weight:700}
    .account .meta{min-width:0}
    .account .meta .name{font-weight:600}
    .account .meta .email{font-size:13px;color:var(--muted)}

    .side-section{margin-top:10px}
    .side-title{font-size:12px;color:var(--muted);margin-bottom:8px}
    .nav-list{display:flex;flex-direction:column;gap:6px}
    .nav-item{
      display:flex;align-items:center;gap:10px;padding:10px;border-radius:8px;color:var(--text);
      cursor:pointer;border:1px solid transparent;
    }
    .nav-item:hover{background:rgba(255,255,255,0.01);border-color:rgba(255,255,255,0.02)}
    .nav-item .label{flex:1;font-size:14px}
    .nav-item .muted{font-size:13px;color:var(--muted)}

    /* Databases tree */
    .db-tree{margin-top:8px;border-top:1px dashed rgba(255,255,255,0.02);padding-top:10px}
    .db{padding:8px;border-radius:8px;display:block}
    .db .db-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
    .db-name{display:flex;align-items:center;gap:8px;font-weight:600}
    .chev{width:18px;height:18px;opacity:0.8;transition:transform .18s ease}
    .chev.rotate{transform:rotate(90deg)}
    .tables{margin-top:8px;padding-left:22px;display:none;gap:6px;flex-direction:column}
    .tables .tb{display:flex;align-items:center;gap:8px;padding:6px;border-radius:6px;color:var(--muted);font-size:13px}
    .tables .tb:hover{color:var(--text);background:rgba(255,255,255,0.01)}

    /* RIGHT AREA top */
    .right{
      display:flex;flex-direction:column;gap:12px;
      min-height:calc(100vh - 96px);
    }
    .topbar{
      display:flex;align-items:center;justify-content:space-between;gap:12px;
    }
    .db-banner{
      background:linear-gradient(90deg,rgba(255,255,255,0.008), rgba(255,255,255,0.01));
      border:1px solid var(--card-border);
      padding:10px;border-radius:10px;display:flex;align-items:center;gap:12px;width:100%;
    }
    .db-banner .title{font-weight:700}
    .db-actions{display:flex;gap:8px;align-items:center}

    /* second navbar (frames) */
    .framebar{
      display:flex;gap:8px;flex-wrap:wrap;
    }
    .frame-btn{
      padding:8px 10px;border-radius:8px;border:1px solid transparent;background:transparent;color:var(--muted);cursor:pointer;display:inline-flex;gap:8px;align-items:center;
    }
    .frame-btn.selected{background:linear-gradient(90deg,rgba(0, 0, 0, 0.767),rgba(6,182,212,0.06));color:var(--text);border-color:rgba(108,99,255,0.08)}
    .frame-btn svg{opacity:0.95}

    /* MAIN content panel */
    .panel{
      background:linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.006));
      border:1px solid var(--card-border);
      padding:16px;border-radius:12px;flex:1;overflow:auto;
      min-height:480px;
    }

    /* common utilities */
    .row{display:flex;gap:12px;align-items:center}
    .col{display:flex;flex-direction:column;gap:8px}
    .muted{color:var(--muted);font-size:13px}
    .btn{
      display:inline-flex;gap:8px;align-items:center;padding:8px 10px;border-radius:8px;border:0;background:var(--accent);color:#fff;cursor:pointer;font-weight:600;
    }
    .btn.ghost{background:transparent;border:1px solid rgba(255,255,255,0.04);color:var(--muted);font-weight:500}
    .icon{width:16px;height:16px;display:inline-block;vertical-align:middle;fill:currentColor}

    input[type="text"], input[type="number"], select, textarea{
      background:var(--input-bg);border:1px solid rgba(255,255,255,0.03);color:var(--text);padding:8px;border-radius:8px;
      font-size:14px;width:80%;
    }
    textarea{min-height:160px;resize:vertical;padding-top:10px}
    label.small{font-size:13px;color:var(--muted)}

    .table{
      width:100%;border-collapse:collapse;margin-top:12px;font-size:13px;
    }
    .table th,.table td{padding:10px;border-bottom:1px dashed rgba(255,255,255,0.02);text-align:left;color:var(--muted)}
    .table th{color:var(--muted-2);font-weight:600;font-size:12px}

    .badge{background:rgba(255,255,255,0.02);padding:6px 8px;border-radius:999px;font-weight:600;color:var(--muted)}
    .switch{display:inline-flex;align-items:center;gap:8px}
    .checkbox{width:16px;height:16px;border-radius:4px;border:1px solid rgba(255,255,255,0.06);display:inline-grid;place-items:center;background:transparent;cursor:pointer}
    .checkbox input{display:none}
    .small-muted{font-size:12px;color:var(--muted)}

    /* subtle scrollbars */
    ::-webkit-scrollbar{height:10px;width:10px}
    ::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.03);border-radius:8px}
    ::-webkit-scrollbar-track{background:transparent}

    .nav-item.active {
  background: linear-gradient(90deg, rgba(108,99,255,0.14), rgba(6,182,212,0.06));
  border-color: rgba(108,99,255,0.08);
  color: var(--text);
}



    
          /* ====  DROP DOWN  LARGE ==== */
          .wrapper-app-header, .wrapper-user-account{
  position: relative;
  display: inline-block;
}
  .dropdown-app-header, .dropdown-user-account{
  list-style-type: none;
  padding: 0;
  margin: 0;
  background: linear-gradient(105deg,#07090a, #0a0909, #030202, #07090a);
  border-radius: 12px;
  border: 1px solid #474747;
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  position: absolute;
  top: 100%; 
  left: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dropdown-app-header li a, .dropdown-user-account li a{
  color: #8b8b8b;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-app-header li a:hover, .dropdown-user-account li a:hover{
  background-color: #313131;
  border-radius: 12px;
}

/* Class to show the dropdown */
.dropdown-app-header.show, .dropdown-user-account.show{
  opacity: 1;
  visibility: visible;
}
.dropdown-i-item{
  margin-left: 12px;
  align-items: center;
  margin-bottom: 5px;
}
.dropdown-i-item a{
  margin-left: 12px;
  font-size: small;
  text-decoration: none;
  color: #d1c5c5;
  font-family: Verdana;
}
.dropdown-i-item a:hover{
  color: #474747;
}
.dropdown-p{
  border-top: 1px solid #474747;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}
.dropdown-p a{
  color: #0056b3;
  text-decoration: none;
}
.dropdown-p a:hover{
  color: #007BFF;
}



/* ======= DROP DOWN SMALL SCALE*/
.wrapper-hd-s1{
  position: relative;
  display: inline-block;
}
  .dropdown-hd-s1{
  list-style-type: none;
  padding: 0;
  margin: 0;
  background: linear-gradient(105deg,#07090a, #0a0909, #030202, #07090a);
  border-radius: 12px;
  border: 1px solid #474747;
  min-width: 170px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  position: absolute;
  top: 100%; 
  left: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dropdown-hd-s1 li a{
  color: #8b8b8b;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-hd-s1 li a:hover{
  background-color: #313131;
  border-radius: 12px;
}

/* Class to show the dropdown */
.dropdown-hd-s1.show{
  opacity: 1;
  visibility: visible;
}
/* =============================================================/*/
/* =============================================================/*/
    /* responsive */
    @media (max-width:980px){
      .wrap{grid-template-columns:1fr;min-height:100vh}
      .sidebar{height:auto;order:2}
    }


    /* Horizontal scroll menu for mobile */
@media (max-width: 768px) {
  .framebar,
  .topbar > div:first-child {
    overflow-x: auto;
    display: flex;
    white-space: nowrap;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
  }

  .framebar::-webkit-scrollbar,
  .topbar > div:first-child::-webkit-scrollbar {
    height: 6px;
  }

  .framebar::-webkit-scrollbar-thumb,
  .topbar > div:first-child::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
  }

  /* Buttons stay inline / no wrap */
  .frame-btn {
    flex: 0 0 auto;
  }
  
  .wrap{
    margin-left: -2rem;
    margin-right: -2rem;
  }
 
}


.framebar-container {
  width: 100%;
}

/* Ensures horizontal scrolling on mobile */
@media (max-width: 768px) {
  .framebar-container {
    overflow-x: auto;
    white-space: nowrap;
  }

  .framebar {
    flex-wrap: nowrap !important;
  }

  .frame-btn,
  .btn.ghost {
    flex: 0 0 auto;
  }
}
/* MOBILE: move search bar below for clean layout */
/* REAL FIX — Put search bar on its own row on mobile */
@media (max-width: 850px) {

  .user-utilities {
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
  }

  .h-search-container {
    width: 100%;
    order: -1;          /* move search bar to the top of utilities */
    display: flex;
    justify-content: flex-start;
  }

  .search-box {
    width: 100% !important;
    margin: 0 !important;
  }

  .h-search-btn {
    margin-left: -35px; /* keep icon inside the input */
    position: relative;
    z-index: 10;
  }
}
