*{
  box-sizing: border-box;
}

body{
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif;
  background: #b5d1db;
  color: #020b18;
}

.user-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 28px;
  background:#323233;
  border-bottom:1px solid #91a2f0;
  position: fixed;
  width:100%;
  z-index: 900;
  top:0;
  left:0;
  gap:20px;
}

.brand{
  font-weight:700;
  color:#d8def1;
  flex:1;
}

.user-topnav{
  display:flex;
  gap:12px;
  align-items:center;
}

.user-topnav .search{
  padding:10px 12px;
  border-radius:10px;
  border:1px solid #b7b8b9;
  background:#f2f3f5;
  color:#070707;
}

.user-topnav .btn{
  padding:8px 14px;
  border-radius:8px;
  background:#625d99;
  color:#fff;
  border:none;
  cursor:pointer;
}

.menu-btn{
  font-size:28px;
  color:#7b76b1;
  cursor:pointer;
  background:none;
  border:none;
  padding:8px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.btn-icon {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: #334155;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sidebar{
  position:fixed;
  top:0;
  left:-280px;
  width:260px;
  height:100vh;
  background:#050505;
  padding:20px;
  display:flex;
  flex-direction:column;
  gap:18px;
  transition:0.3s;
  z-index:950;
  overflow-y: auto; 
  overflow: hidden;
}


.sidebar.active{
  left:0;
}
.sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0 10px;
}
.sidebar .close-btn{
  align-self:flex-end;
  cursor:pointer;
  color:#cbd5e1;
  font-size:20px;
  border:none;
  background:none;
}

.sidebar .profile{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  padding-bottom:10px;
  border-bottom:1px solid #334155;
}

.sidebar .profile img,
.profile img {
  width:80px;
  height:80px;
  border-radius:50%;
  object-fit:cover;
}

.sidebar .profile h3{
  margin:0;
  color:#f8fafc;
}
.sidebar-nav {
  flex: 1; 
  overflow-y: auto; 
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 10px;
}
.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}
.sidebar-nav::-webkit-scrollbar-track {
    background: #050505;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}
.sidebar a{
  color:#cbd5e1;
  text-decoration:none;
  padding:12px 14px;
  border-radius:8px;
  display:block;
  transition:background 0.2s ease;
}

.sidebar a:hover,
.sidebar a.active{
  background:#1f2937;
  color:#fff;
}

.bar{
  position:fixed;
  top:78px;
  left:0px;
  width:220px;
  height:calc(100vh - 90px);
  background:#e3e5e7;
  padding-top:20px;
  display:flex;
  flex-direction:column;
  gap:8px;
  border-right:1px solid #334155;
  border-left:1px solid #334155;
  border-bottom:1px solid #334155;
  overflow-y:auto;
}

.bar a{
  padding:12px 18px;
  text-decoration:none;
  color:#070707;
  border-radius:8px;
  transition:background 0.2s ease;
}

.bar a:hover{
  background: #1f2937;
  color:#fff;
}

body.sidebar-open .user-header{
  left: 260px;
  width: calc(100% - 260px);
  transition: all 0.28s ease;
}
.user-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 28px;
  background:#323233;
  border-bottom:1px solid #91a2f0;
  position:fixed;
  top:0;
  left:0;
  width:100%;
  z-index:900;
  transition: all 0.28s ease;
}

body.sidebar-open .menu-btn{
  left:275px;
  transition: left 0.28s ease;
}
body.sidebar-open .bar{
    left: 270px; 
    transition: left 0.3s ease;
}

body.sidebar-open .user-main{
    margin-left: 760px; 
    transition: margin-left 0.3s ease;
}

.user-main{
  margin-top:78px;
  margin-left:500px;
  padding:32px 36px;
}

.user-main h1{
  margin-top:0;
  font-size:32px;
  color:#fff;
}

.panel{
  background:#b7b7bb;
  border:1px solid #d6d7d8;
  border-radius:16px;
  padding:24px;
  margin-bottom:24px;
}

.panel h2{
  margin-top:0;
  margin-bottom:18px;
  color:#070707;
}

.settings-form{
  display:grid;
  gap:18px;
}
body.dark-theme {
    background-color: #1e1e1e;
    color: white;
}
body.light-theme {
    background-color: #ffffff;
    color: #333;
}
body.light-theme .panel {
    background: #f5f5f5;
    color: #333;
}

body.dark-theme .panel {
    background: #2b2b2b;
    color: white;
}
body.light-theme .panel {
    background: #f5f5f5;
    color: #222;
}

body.dark-theme .panel {
    background: #2b2b2b;
    color: white;
}
body.light-theme input,
body.light-theme select {
    background: white;
    color: #222;
    border: 1px solid #ccc;
}
body.dark-theme input,
body.dark-theme select {
    background: #3a3a3a;
    color: white;
    border: 1px solid #555;
}
body.light-theme .bar a {
    background: #ece9e9;
    color:#0e0404
}
body.dark-theme .bar a {
    background: black;
    color: white;
}
body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme label {
    color: #222;
}
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme label {
    color: white;
}
.form-group{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.form-group label{
  color:#0b0c0c;
  font-weight:600;
}

.form-group input,
.form-group select{
  padding:12px 14px;
  border-radius:10px;
  border:1px solid #475569;
  background:#0f172a;
  color:#e2e8f0;
}

.form-group input:focus,
.form-group select:focus{
  outline:none;
  border-color:#3122d1;
}

.checkbox-group{
  display:grid;
  gap:10px;
}

.checkbox-group label{
  display:flex;
  align-items:center;
  gap:10px;
  color:#212224;
  cursor:pointer;
}

.checkbox-group input{
  accent-color:#3122d1;
}

.btn-primary{
  padding:12px 24px;
  border:none;
  border-radius:10px;
  background:#3122d1;
  color:#fff;
  cursor:pointer;
  font-weight:700;
  transition:background 0.2s ease;
}

.btn-primary:hover{
  background:#2416a8;
}

@media (max-width: 1200px) {
  .bar{
    display:none;
  }

  .user-main{
    margin-left:260px;
  }
}

@media (max-width: 900px) {
  .user-header{
    flex-direction:column;
    align-items:flex-start;
    gap:12px;
  }

  .menu-btn{
    position:relative;
    left:0;
  }

  .user-main{
    margin-left:0;
    padding:20px;
  }

  .sidebar{
    width:100%;
    left:-100%;
  }

  .sidebar.active{
    left:0;
  }

  .bar{
    position:relative;
    top:0;
    left:0;
    width:100%;
    height:auto;
    border-right:none;
    border-bottom:1px solid #334155;
  }
}
