*{box-sizing:border-box}
html,body{max-width:100%;overflow-x:hidden}
body{
  margin:0;
  background:#11142d;
  color:#fff;
  font-family:Tahoma,Arial,sans-serif;
  font-size:14px;
}
a{color:#fff;text-decoration:none}
img{max-width:100%;height:auto}

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

.sidebar{
  width:235px;
  background:#0b0e24;
  border-left:1px solid #2b2f55;
  padding:18px 12px;
  position:fixed;
  right:0;
  top:0;
  bottom:0;
  overflow-y:auto;
  z-index:10;
}

html[dir="ltr"] .sidebar{
  right:auto;
  left:0;
  border-left:0;
  border-right:1px solid #2b2f55;
}

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

.logo img{
  max-width:135px;
  max-height:85px;
  object-fit:contain;
  display:block;
  margin:0 auto 8px;
}

.logo .brand{
  font-size:22px;
  font-weight:bold;
}

.logo span{color:#23d36b}

.menu a{
  display:block;
  padding:12px 14px;
  border-radius:9px;
  margin-bottom:7px;
  background:#151936;
  border:1px solid transparent;
}

.menu a:hover{
  background:#20264d;
  border-color:#3d4479;
}

.main{
  margin-right:235px;
  width:calc(100% - 235px);
  min-height:100vh;
}

html[dir="ltr"] .main{
  margin-right:0;
  margin-left:235px;
}

.topbar{
  min-height:58px;
  background:#151936;
  border-bottom:1px solid #2b2f55;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 22px;
  position:sticky;
  top:0;
  z-index:5;
}

.page{padding:22px}

.card{
  background:#171b3a;
  border:1px solid #30365f;
  border-radius:12px;
  padding:18px;
  margin-bottom:18px;
  overflow:hidden;
}

h1,h2,h3{margin:0 0 15px}

input,select,textarea{
  width:100%;
  background:#10142e;
  color:#fff;
  border:1px solid #3b426f;
  border-radius:7px;
  padding:11px;
  margin:6px 0 12px;
  outline:none;
}

input:focus,select:focus,textarea:focus{
  border-color:#22c55e;
}

button,.btn{
  background:#22c55e;
  color:#fff;
  border:0;
  border-radius:8px;
  padding:11px 18px;
  cursor:pointer;
  font-weight:bold;
  display:inline-block;
}

.btn-red{background:#ef4444}

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

table{
  width:100%;
  border-collapse:collapse;
  background:#141832;
  border-radius:10px;
  overflow:hidden;
  min-width:720px;
}

.table-wrap{
  width:100%;
  overflow-x:auto;
}

th,td{
  padding:11px;
  border-bottom:1px solid #2e345c;
  text-align:right;
  vertical-align:top;
  white-space:nowrap;
}

html[dir="ltr"] th,
html[dir="ltr"] td{
  text-align:left;
}

th{
  background:#0e122b;
  color:#cbd5ff;
}

.badge{
  padding:4px 9px;
  border-radius:20px;
  background:#293055;
  display:inline-block;
}

.small{
  font-size:12px;
  color:#aeb6e8;
}

.lang a{
  padding:5px 8px;
  background:#23294d;
  border-radius:7px;
  margin:0 3px;
}

.login-page{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:
    radial-gradient(circle at top,#26306b 0,#11142d 45%,#080a18 100%);
}

.login-card{
  width:100%;
  max-width:420px;
  background:#171b3a;
  border:1px solid #30365f;
  border-radius:18px;
  padding:28px;
  box-shadow:0 15px 45px rgba(0,0,0,.35);
}

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

.login-logo img{
  max-width:160px;
  max-height:100px;
  object-fit:contain;
  display:block;
  margin:0 auto 10px;
}

.login-logo .brand{
  font-size:25px;
  font-weight:bold;
}

@media(max-width:1000px){
  .grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:760px){
  body{font-size:13px}

  .layout{
    display:block;
  }

  .sidebar{
    position:relative;
    width:100%;
    height:auto;
    right:auto;
    left:auto;
    border-left:0;
    border-right:0;
    border-bottom:1px solid #2b2f55;
    padding:14px;
  }

  .logo{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    margin-bottom:12px;
  }

  .logo img{
    max-width:58px;
    max-height:58px;
    margin:0;
  }

  .logo .brand{
    font-size:19px;
  }

  .menu{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }

  .menu a{
    margin:0;
    text-align:center;
    padding:11px 8px;
  }

  .main,
  html[dir="ltr"] .main{
    width:100%;
    margin:0;
  }

  .topbar{
    flex-direction:column;
    align-items:flex-start;
    padding:12px 15px;
  }

  .page{
    padding:14px;
  }

  .card{
    padding:14px;
  }

  .grid{
    grid-template-columns:1fr;
    gap:8px;
  }

  input,select,textarea{
    font-size:16px;
  }

  button,.btn{
    width:100%;
    text-align:center;
    margin-top:6px;
  }

  .login-card{
    padding:22px;
    border-radius:15px;
  }
}
