/* root/portal/static/styles.css */

body {
  font-family: sans-serif;
  background-color: #000000;
  color: #FFFFFF;
  display: flex;
  justify-content: center;
  padding-top: 40px;
}

h1, h2, h3 {
  color: #6BD2DE;
  text-align: center;
}

.login-box,
.admin-box,
table {
  background-color: #212121;
  color: #FFFFFF;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #6BD2DE;
}

input, select, button {
  margin: 5px 0;
  padding: 10px;
  width: 100%;
  background-color: #000000;
  color: #B9E5EB;
  border: 1px solid #6BD2DE;
  border-radius: 5px;
  box-sizing: border-box;
}

button {
  background-color: #6BD2DE;
  color: #000000;
  cursor: pointer;
  font-weight: bold;
  width: fit-content;
  transition: all 0.2s ease;
}

button:hover {
  background-color: #B9E5EB;
  color: #000000;
}

button.tool-save,
button.tool-edit,
button.tool-delete,
button.tool-unlock,
button.tool-lock,
button.tool-isAdmin,
button.tool-isNotAdmin,
button.tool-contract {
  width: fit-content;
  background-color: transparent;
  border: none;
  padding: 6px 12px;
  font-weight: bold;
  transition: all 0.2s ease;
}

button.tool-save {
  color: #6BD2DE;
}

button.tool-save:hover {
  background-color: #6BD2DE;
  color: #000000;
}

button.tool-edit {
  color: #ffd43b;
}

button.tool-edit:hover {
  background-color: #fab005;
  color: #000000;
}

button.tool-unlock {
  color: #6BD2DE;
  pointer-events: none;
  cursor: not-allowed;
}

button.tool-isAdmin {
  color: #c338ff;
}

button.tool-isAdmin:hover {
  background-color: #c338ff;
  color: #000000;
}

button.tool-isNotAdmin {
  color: #ededed;
}

button.tool-isNotAdmin:hover {
  background-color: #ededed;
  color: #000000;
}

button.tool-lock {
  color: #37f244;
}

button.tool-lock:hover {
  background-color: #37f244;
  color: #000000;
}

button.tool-delete {
  color: #f44336;
}

button.tool-delete:hover {
  background-color: #f44336;
  color: #FFFFFF;
}

button.tool-contract {
  color: #0075ff;
}

button.tool-contract:hover {
  background-color: #0075ff;
  color: #fff;
}

#dashboard-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

#dashboard-table th,
#dashboard-table td {
  padding: 10px;
  text-align: left;
  word-break: break-word;
  margin: 0 5px;
  border-bottom: none;
}

#dashboard-table tr:nth-child(even) {
  background-color: #1a1a1a;
}

#dashboard-table tr:hover {
  background-color: #000;
}

#dashboard-table th {
  background-color: #212121;
  color: #6BD2DE;
  border-bottom: 1px solid #6BD2DE;
}

#dashboard-table td input[type="text"],
#dashboard-table td input[type="number"],
#dashboard-table td select
 {
  border: none;
  background-color: transparent;
  margin: 0;
  padding: 3px;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #212121;
  color: #B9E5EB;
  text-align: center;
  padding: 10px 0;
  border-top: 1px solid #6BD2DE;
  font-size: 0.9em;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.5);
}

.footer-links {
  margin-bottom: 5px;
}

.footer-links a {
  margin: 0 10px;
  color: #6BD2DE;
  text-decoration: none;
  font-weight: bold;
}

.footer-links a:hover {
  text-decoration: underline;
  color: #FFFFFF;
}

.footer-copy {
  color: #888;
}

hr {
  border: 1px solid #6BD2DE;
}

.back-button {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #6BD2DE;
  color: #6BD2DE;
  background-color: transparent;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9em;
  transition: all 0.2s ease;
}

.back-button:hover {
  background-color: #6BD2DE;
  color: #000000;
}

.admin-box {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

.admin-box table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.admin-box th,
.admin-box td {
  padding: 10px;
  text-align: left;
  word-break: break-word;
  border-bottom: 1px solid #6BD2DE;
}

.admin-box tr:nth-child(even) {
  background-color: #1a1a1a;
}

.admin-box th {
  background-color: #212121;
  color: #6BD2DE;
}

.admin-box h2 {
  color: #fff;
}

.add-user-button {
  margin-bottom: 10px;
  padding: 10px 15px;
  background-color: transparent;
  color: #6BD2DE;
  border: 1px solid #6BD2DE;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  width: fit-content;
  float: right;
  transition: all 0.2s ease;
}

.add-user-button:hover {
  background-color: #6BD2DE;
  color: #000000;
}

.close-button {
  margin-bottom: 10px;
  padding: 10px 15px;
  background-color: transparent;
  color: #f00;
  border: 1px solid #f00;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  width: fit-content;
  float: right;
  transition: all 0.2s ease;
}

.close-button:hover {
  background-color: #f00;
  color: #fff;
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.7);
}

.modal-content {
  background-color: #212121;
  margin: auto;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  color: #FFFFFF;
}

.modal-content input,
.modal-content select,
.modal-content button {
  width: 100%;
  margin: 8px 0;
  padding: 10px;
  box-sizing: border-box;
  background-color: #000000;
  color: #B9E5EB;
  border: 1px solid #6BD2DE;
}

.modal-content button {
  background-color: #6BD2DE;
  color: #000000;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}

.modal-content button:hover {
  background-color: #B9E5EB;
}

.close {
  color: #aaa;
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #FFFFFF;
}

.parent-container {
  display: flex;
}

.child-container {
  flex: 1;
}

.child-container:first-child {
  margin-right: 20px;
}

.error {
  color: #f44336;
}

.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.custom-plan-wrapper {
    margin-top: 5px;
}

.admin-box .currentRate {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.admin-box .currentRate input[type="number"] {
  width: fit-content;
  background-color: transparent;
  border: none;
}

/* Pack first & last columns to fit their content */
#dashboard-table th:first-child,
#dashboard-table td:first-child,
#dashboard-table th:last-child,
#dashboard-table td:last-child,
.admin-box table th:first-child,
.admin-box table td:first-child,
.admin-box table th:last-child,
.admin-box table td:last-child {
  white-space: nowrap;   /* don’t wrap; keep to content width */
  word-break: normal;    /* undo the table’s break-word */
  width: 1%;             /* hint: keep this column as small as possible */
}

/* Inputs in those edge columns shouldn’t stretch */
#dashboard-table td:first-child input,
#dashboard-table td:first-child select,
#dashboard-table td:last-child  input,
#dashboard-table td:last-child  select,
.admin-box td:first-child input,
.admin-box td:first-child select,
.admin-box td:last-child  input,
.admin-box td:last-child  select {
  width: auto;           /* override the global width:100% */
}
