@font-face {
  font-family: 'Raleway';
  src: url('../fonts/Raleway-VariableFont_wght.ttf') format('truetype');
  font-weight: normal; /* Since it's a variable font, define the weight range */
  font-style: normal;
}

body {
  font-family: 'Raleway', sans-serif;
  background-color: #242B2B;
  color: white;
}

.users-list {
  width: 60%;
  margin-left: auto;
  margin-right: auto;
}

/* Logo */
.kube-title {
    display: flex; /* Enables flexbox layout */
    justify-content: space-between;
    align-items: center; /* Aligns items vertically */
}

.authentication-block {
    align-items: right;
}

.authentication-block a {
    color: #4f9492;
    text-align: right;
}

.logo-text {
    font-size: 36px; /* Adjust the font size of the title */
    font-weight: bold; /* Make the title bold */
    color: #4f9492;
}
/* */

h1, h2 {
    color: #4f9492;
}

td {
  border: 1px solid #4f9492;
  border-collapse: collapse;
  border-radius: 3px;
  text-align: left;
  padding-left: 10px;
}

th {
    background-color: #4f9492;
    color: #475151;
    border-radius: 3px;
    text-align: left;
    padding-left: 10px;
}

/* --------- */
.permissions {
  width: 60%;
  margin-left: auto;
  margin-right: auto;
}

.permissions-header {
  text-align: center;
}

.permissions-table table {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.permissions-manage {
  margin-left: auto;
  margin-right: auto;
  width: 60%;
}

.templates-page {
  margin-left: auto;
  margin-right: auto;
  width: 60%;
}

button {
    padding: 12px 28px;
    background-color: #4f9492;
    color: white;
    border: none;
    font-size: 14px;
    margin-top: 1%;
    text-align: center;
    border-radius: 8px;
}

button:hover {
    background-color: #4e7674;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.additional-apis {     /* this will hide div with class div_class_name */
  display:none;
}

.cover-container {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.inner-menu {
    color: #465b5a;
}

.main-page {
    text-align: center;
}

input[type=text] {
  box-sizing: border-box;
  border: 3px solid #4f9492;
  -webkit-transition: 0.5s;
  transition: 0.5s;
  outline: none;
}

input[type=text]:focus {
  border: 3px solid #566065;
}

/* Registration */
/* Add padding to containers */
.registration {
  padding: 16px;
  width: 60%;
  margin-left: auto;
  margin-right: auto;
}

button.register-button.disabled:hover {
    background-color: initial; /* Removes hover background */
    cursor: not-allowed; /* Changes the cursor to 'not-allowed' */
}

/* Full-width input fields */
input[type=text], input[type=password] {
  width: 100%;
  padding: 15px;
  margin: 5px 0 22px 0;
  display: inline-block;
  border: none;
  background: #f1f1f1;
}

input[type=text]:focus, input[type=password]:focus {
  background-color: #ddd;
  outline: none;
}

/* Overwrite default styles of hr */
hr {
  border: 1px solid #f1f1f1;
  margin-bottom: 25px;
}

tr {
  background-color: #3a585b;
}

/* Add a blue text color to links */
a {
  color: dodgerblue;
}

.error-message {
    color: red;
    font-size: 0.9em;
    margin-top: 5px;
}

.message {
    font-size: 0.9em;
    margin-top: 5px;
}

/* Set a grey background color and center the text of the "sign in" section */
.signin {
  text-align: center;
}
/* ----------- */

/* Login page */

/* Bordered form
form {
  border: 4px solid #4f9492;
} */

/* Full-width inputs */
input[type=text], input[type=password] {
  width: 100%;
  padding: 12px 20px;
  margin: 8px 0;
  display: inline-block;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

/* Extra style for the cancel button (red) */
.cancel-button {
  width: auto;
  background-color: #f44336;
}

/* Center the avatar image inside this container */
.login-img {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 24px 0 12px 0;
}

/* Avatar image */
img.avatar {
  width: 10%;
  border-radius: 20%;
}

/* Add padding to containers */
.login-container {
  padding: 16px;
}

/* The "Forgot password" text */
span.pwd {
  float: right;
  padding-top: 16px;
}

/* Change styles for span and cancel button on extra small screens */
@media screen and (max-width: 300px) {
  span.pwd {
    display: block;
    float: none;
  }
  .cancel-button {
    width: 100%;
  }
}

.imgcontainer {
    width: 30%;
    height: 30%;
    align: center;
}

.login-form {
    margin-left: auto;
    margin-right: auto;
    width: 60%;
}

.login-container {
    margin-left: auto;
    margin-right: auto;
}
/* ---------- */

/* Users page */
.users-page {
    margin-left: auto;
    margin-right: auto;
    width: 60%;
}

.users-header {
    text-align: center;
}

.users-table table{
    flex: 1;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

{box-sizing: border-box;}

/* The popup form - hidden by default */
.form-popup {
  width: 50%;
  display: none;
  bottom: 0;
  right: 15px;
  border: 3px solid #f1f1f1;
  z-index: 9;
}

/* Add styles to the form container */
.form-container {
  max-width: 300px;
  padding: 10px;
  background-color: white;
}

/* Full-width input fields */
.form-container input[type=text], .form-container input[type=password] {
  width: 100%;
  padding: 15px;
  margin: 5px 0 22px 0;
  border: none;
  background: #f1f1f1;
}

/* When the inputs get focus, do something */
.form-container input[type=text]:focus, .form-container input[type=password]:focus {
  background-color: #ddd;
  outline: none;
}

/* Set a style for the submit/login button */
.form-container .button {
  background-color: #04AA6D;
  color: white;
  border: none;
  cursor: pointer;
  width: 100%;
  margin-bottom:10px;
  opacity: 0.8;
}

/* Add a red background color to the cancel button */
.form-container .button-cancel {
  background-color: red;
}

/* Add some hover effects to buttons */
.form-container .button:hover, .open-button:hover {
  opacity: 1;
}

/* ---------- */

.overlay-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-box {
    background: #4d7371;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    width: 320px;
    text-align: center;
    opacity: 0;
    transform: scale(0.8);
    animation: fadeInUp 0.5s ease-out forwards;
}

.form-container {
    display: flex;
    flex-direction: column;
}

.form-label {
    margin-bottom: 10px;
    font-size: 16px;
    color: #444;
    text-align: left;
}

.form-input {
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
}

.btn-submit,
.btn-close-popup {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-submit {
    background-color: green;
    color: #fff;
}

.btn-close-popup {
    margin-top: 12px;
    background-color: #e74c3c;
    color: #fff;
}

.btn-submit:hover,
.btn-close-popup:hover {
    background-color: #e28279;
}

/* Keyframes for fadeInUp animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation for popup */
.overlay-container.show {
    display: flex;
    opacity: 1;
}
/*  -----------------  */

.register-account {
    padding-top: 2em;
    text-align: right;
}


/* Navigation bar main menu */

.navbar{
    display:flex;                 /* lay out children in a row            */
    justify-content:space-between;/* equal gaps between items             */
    background:#4f9492;
    border-radius:10px;
    width:60%;
    margin:0 auto;                /* center the bar itself                */
}

/* --- EACH TOP-LEVEL ITEM (dropdown / dropdown-my) --- */
.navbar > .dropdown,
.navbar > .dropdown-my{
    flex:1 1 0;      /* all boxes get identical width, grow if needed  */
    position:relative;/* anchor for the absolute dropdown-content       */
    box-sizing:border-box;
}

/* --- THE VISIBLE BUTTON --- */
.dropbtn{
    width:100%;          /* fill its flex-item completely               */
    padding:14px 16px;
    font-size:16px;
    background:inherit;  /* inherit teal background                     */
    color:#fff;
    border:none;
    outline:none;
    cursor:pointer;
    text-align:center;
}

/* --- SPECIAL COLOUR FOR “My” --- */
.dropdown-my .dropbtn{background:#6B2CBF;}
.dropdown-my:hover .dropbtn{background:#57249C;}

/* --- SHARED HOVER FOR OTHER BUTTONS --- */
.dropdown:hover .dropbtn{background:#4e7674;}

/* --- DROPDOWN PANEL --- */
.dropdown-content{
    display:none;
    position:absolute;
    top:100%;
    left:0;
    width:100%;             /* match parent’s width                     */
    background:#3d4d4f;
    border-radius:10px;
    box-shadow:0 8px 16px rgba(0,0,0,.2);
    z-index:1;
}
.dropdown-content a{
    display:block;
    padding:12px 16px;
    color:#fff;
    text-decoration:none;
    border-radius:10px;
}
.dropdown-content a:hover{background:#5a7578;}

/* show the panel on hover */
.dropdown:hover .dropdown-content{display:block;}

/* --------------------- */

.main-logo {
    display: flex;
    align-items: flex-start; /* Align items at the start vertically */
    justify-content: space-between; /* Add space between elements */
    width: 75%;
}

/* Center and style the permissions section */
.logo {
    flex: 1;
    margin-left: 30%; /* Add space between menu and permissions */
}

.logo-text {
    flex: 80%;
}
/* */

/* Manage buttons */
.manage-buttons {
    display: flex;
    align-items: flex-start; /* Align items at the start vertically */
    justify-content: space-between; /* Add space between elements */
    width: 60%;
    gap: 10px;
    padding: 3px 3px;
}

.view-button button {
    font-size: 12px;
    height: 30px;
    width: 80px;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    padding: 0;
}

.edit-button button {
    font-size: 12px;
    height: 30px;
    width: 80px;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    padding: 0;
}

.delete-button button {
    font-size: 12px;
    height: 30px;
    width: 80px;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    padding: 0;
}
/* */

.template-common-data-table table{
    width: 100%;
}

/* Groups page */
.groups-list {
    margin-left: auto;
    margin-right: auto;
    width: 60%;
}

.groups-header {
    text-align: center;
}

.groups-table table{
    flex: 1;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Group members */

.members {
    margin-left: auto;
    margin-right: auto;
    width: 60%;
}

.members-common-data h1 {
    text-align: center;
}

.members-header h1 {
    text-align: center;
}

/* Таблица в members-common-data — чтобы не ломалась */
.group-common-data-table table {
    width: 100%;
    table-layout: auto; /* обычная разметка */
}

/* Контейнер с выбором участников — флекс */
.members-selector {
    display: flex;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    gap: 10px; /* отступ между колонками */
}

/* Списки участников — занимают равную ширину, прокрутка при переполнении */
.all-members-list, .selected-members-list {
    flex: 1 1 0;
    overflow-y: auto;
    max-height: 400px;
}

/* Таблицы в списках участников — растягиваются и фиксированная верстка */
.all-members-list table,
.selected-members-list table {
    width: 100%;
    table-layout: fixed;
}

/* Ячейки с именами — обрезаем длинные имена */
.all-members-list td, .selected-members-list td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Блок с кнопками — фиксированная ширина, вертикальное расположение */
.move-buttons {
    width: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    margin: 0 10px;
    border: none;
}

/* Кнопки стили */
.move-in button,
.move-out button {
    padding: 14px 14px;
    background-color: #4f9492;
    color: white;
    border: none;
    text-align: center;
    font-size: 14px;
    cursor: pointer;
}

.move-in button:hover,
.move-out button:hover {
    background-color: #4e7674;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Bindings page */
.bindings {
    margin-left: auto;
    margin-right: auto;
    width: 60%;
}

.bindings-list {
    margin-left: auto;
    margin-right: auto;
    width: 60%;
}

.bindings-header {
    text-align: center;
}

.bindings-table table{
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.binding-common-data-table table{
    width: 100%;
}

.binding-template-data-table table{
    width: 100%;
}

.binding-target table{
    width: 100%;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #555;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  margin: 10px auto;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* My page */
.my {
  margin-left: auto;
  margin-right: auto;
  width: 60%;
}

.my-header {
  text-align: center;
}

.my-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Two equal-width columns */
  gap: 20px;                     /* Space between buttons */
  width: max-content;            /* Optional: shrink-wrap content */
  margin: 0 auto;                /* Center the grid horizontally */
}

.my-buttons button {
  width: 175px;         /* Fixed width */
  height: 175px;        /* Fixed height */
  font-size: 16px;     /* Optional: smaller text to fit */
  background-color: #4f9492;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;   /* Center text horizontally */
  line-height: 25px;    /* Center text vertically */
  padding: 0;           /* Remove extra spacing */
  overflow: hidden;     /* Hide overflow if text is too long */
  white-space: nowrap;  /* Prevent text wrap */
}

.my-buttons button{
  width: 175px;         /* Fixed width */
  height: 175px;        /* Fixed height */
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.my-buttons button:hover {
  transform: scale(1.05);  /* Slight zoom in */
  opacity: 0.8;            /* Slight transparency */
}

.common-message-block {
    width: 70%;
    margin-left: auto;
    margin-right: auto;
}

.common-message-block p{
    text-align: center;
}

/* Main dashboard */
.dashboard {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

a.dash {
  display: block; /* чтобы можно было задать размер */
  text-decoration: none;
  color: inherit;
}

a.dash:hover {
  cursor: pointer;
  transform: translateY(-5px);
}

.tile {
  background: #4f9492;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  width: 180px;
  padding: 20px;
  text-align: center;
  transition: transform 0.15s ease-in-out;
}
.tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.tile .number {
  font-size: 48px;
  font-weight: bold;
  color: #242B2B;
  margin-bottom: 10px;
}
.tile .label {
  font-size: 16px;
  color: white;
}
