@font-face {
  font-family: open-sans;
  src: url(OpenSans-VariableFont_wdth,wght.ttf);
}

html, body {
    height: 100%;
    margin: 0;
}

body{
  font-family: open-sans;
  margin:0;
    overflow-x:hidden;
  /*     background-image: url('etusivu.png');
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: 100% 100%;*/
 
}

/* NAVBAR */

.topnav{
  display:flex;
  justify-content: space-between;
  align-items:center;
  padding: 0px 15px;
  height: 50px;
  border-bottom: 2px solid #2a5bd7;



}

.nav-left,
.nav-right{
  display:flex;
  align-items:center;
  gap:20px;
}

/* normal links */

.topnav a{
  text-decoration:none;
  color:rgb(0, 0, 0);
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 4px;
}


.topnav a:hover{
  background:#ddd;
  color:black;
}



/* right side items */

/*.nav-right{
  margin-left:auto;
  display:flex;
}

/* DROPDOWN */

.dropdown{
  position:relative;
}

.dropbtn{
  background:none;
      border:none;
  color:rgb(0, 0, 0);
  cursor:pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;


}

/* dropdown menu */

.dropdown-content{
  position:absolute;
  top:100%;
  left:0;
  background:#f9f9f9;
  min-width:200px;
  box-shadow:0 4px 10px rgba(0,0,0,0.1);
    opacity:0;
  visibility:hidden;
  transform:translateY(-10px);
  transition:0.2s ease;
}

.dropdown-content a{
  display:block;
  padding:10px;
  color:black;
  font-size: 12px;
}

.dropdown-content a:hover{
  background:#ddd;
}

/* show dropdown */

.dropdown:hover .dropdown-content{
  display:block;
    opacity:1;
  visibility:visible;
  transform:translateY(0);
}

.hattutausta {
 padding: 5px 10px;
 background-color: #3b56a3; 
 height: 30px;
 width:40px ;
 align-items: center;


}
.nav-right a{
    gap: 10px;
  margin-right:10px;
}
#icon {
    color: grey;
    font-size: 18px;
}

.popup-overlay{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.3);
  display:none;
  justify-content:center;
  align-items:center;
  z-index:1000;
}

/* popup box */

.popup{
  background:white;
  width:500px;
  border-radius:6px;
  box-shadow:0 4px 20px rgba(0,0,0,0.2);
  overflow:hidden;
}

/* header */

.popup-header{
  padding:12px 15px;
  font-weight:600;
  display:flex;
  justify-content:space-between;
  border-bottom:1px solid #ddd;
}

/* close button */

.close{
  cursor:pointer;
  font-size:18px;
}

/* content */

.popup-content{
  padding:15px;
}

/* message box */

.message{
  background:#d9edf7;
  padding:12px;
  border-radius:4px;
  margin-bottom:15px;
}

/* footer */

.popup-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

/*.table{
  width:100%;
  border:1px solid #ccc;
  border-radius:4px;
  overflow:hidden;
  font-size:14px;
  margin-left: 20px;
  margin-right: 20px;

} */

.table {     /* limits width */
  margin: 20px auto;     /* centers + adds top/bottom space */
  padding: 0 20px;       /* left + right gap INSIDE */
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: visible;
  font-size: 14px;
    box-sizing: border-box;
    width: 100%; /* IMPORTANT */
}

/* SECTION HEADER */

.section-header{
  display:grid;
  grid-template-columns: 50px 1fr 120px 100px;
  align-items:center;
  background:#3b78a8;
  color:white;
  padding:10px;
}

.header-points{
  grid-column: 3 / 5;   /* spans points + grade */
  text-align:right;
  padding-right:10px;   /* shift to align with points column */
}

/* ROWS */

.section-content{
  background:#f9f9f9;
}


.row{
  display:grid;
  grid-template-columns: 50px 1fr 120px 100px;
  align-items:center;
  padding:10px;
  border-top:1px solid #ddd;
}


.icons{
  display:flex;
  gap:5px;
}


.points{
  text-align:right;
  padding-right: 10px;
}

/* alternating rows */

.req{
  width:18px;
  height:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:3px;
  font-size:12px;
  color:rgb(0, 0, 0);
}

.mandatory .req{
  background:orange;
}

.mandatory .req::before{
  content:"\f069";
  font-family:"FontAwesome";
}

.optional .req{
  background:#aee8ff;
}
.optional .req::before{
  content:"\f046";
  font-family:"FontAwesome";
}

.status{
  width:18px;
  height:18px;
  border-radius:3px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  color:rgb(0, 0, 0);
}

.new .status{
    background: rgb(81, 157, 245);
}
.new .status::before{
      content:"\f129";
  font-family:"FontAwesome";
}


.completed .status{
  background:#28a745;
}
.completed .status::before{
  content:"\f00c";
  font-family:"FontAwesome";
}

.ongoing .status{
  background:purple;
}

.ongoing .status::before{
  content:"\f192";
  font-family:"FontAwesome";
}

.failed .status{
  background:red;
}
.failed .status::before{
  content: "\f147";
font-family: "FontAwesome";
}

.grade{
  text-align:right;
  padding-right: 30px;
}

.name{
  cursor:pointer;
}

.row:hover .name{
  color:#2a5bd7;
  text-decoration:underline;
}

.keskiarvo {
    margin: 20px auto;     /* centers + adds top/bottom space */
  padding: 0 20px;   
  font-size: 13px;   
}