/* =========================================================== */
/* File name     : _gateway/css/gateway.css                    */	
/* Version       : 1.03                                        */
/* Latest update : 2026-08-20 11:25                            */  
/* =========================================================== */
/* Change Log                                                  */
/* ----------------------------------------------------------- */
/* 2026-08-19 | 1.01 | Users table: added responsive card-     */
/*                     style table transformation below about  */
/*                     760px                                   */
/* 2026-08-19 | 1.00 | Initial script                          */
/* =========================================================== */
:root {
  --page-bg: #f6f5f1;
  --panel-bg: rgba(255, 255, 255, 0.93);
  --text: #252525;
  --muted: #6d6d6d;
  --border: #d0d0d0;
  --header-bg: #e7e7e7;
  --button: #394f61;
  --button-hover: #263b4b;
  --button-text: #ffffff;
  --success: #246b3d;
  --error: #9d2525;
  --focus: #315c7e;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body.gateway-page {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background-color: var(--page-bg);
  background-image: url("/_gateway/images/texture_white.png");
  background-repeat: repeat;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.gateway-page h1,
.gateway-page h2,
.gateway-page p {
  margin-top: 0;
}

.gateway-page a {
  color: #1f536f;
}

.gateway-page a:hover {
  color: #102f40;
}

.gateway-page input,
.gateway-page button {
  font: inherit;
}

.gateway-page input[type="text"],
.gateway-page input[type="email"],
.gateway-page input[type="password"] {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.75rem;
  border: 1px solid #a7a7a7;
  border-radius: 3px;
  background: #ffffff;
  color: var(--text);
}

.gateway-page input:focus {
  outline: 3px solid rgba(49, 92, 126, 0.25);
  outline-offset: 1px;
  border-color: var(--focus);
}

.gateway-page button,
.gateway-page .button {
  display: inline-block;
  min-height: 42px;
  padding: 0.6rem 1rem;
  border: 1px solid var(--button);
  border-radius: 3px;
  background: var(--button);
  color: var(--button-text);
  cursor: pointer;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.gateway-page button:hover,
.gateway-page .button:hover {
  border-color: var(--button-hover);
  background: var(--button-hover);
  color: #ffffff;
}

.gateway-page .button-secondary,
.gateway-page .link-button {
  border-color: #a7a7a7;
  background: #ffffff;
  color: #263b4b;
}

.gateway-page .button-secondary:hover,
.gateway-page .link-button:hover {
  border-color: #768795;
  background: #edf1f3;
  color: #102f40;
}

.gateway-page .form-message {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid;
  background: rgba(255, 255, 255, 0.8);
}

.gateway-page .form-message-success {
  border-left-color: var(--success);
  color: var(--success);
}

.gateway-page .form-message-error {
  border-left-color: var(--error);
  color: var(--error);
}

/* Login */

.login-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.login-card {
  width: min(100%, 570px);
  padding: 2rem;
  border: 1px solid rgba(105, 105, 105, 0.35);
  border-radius: 6px;
  background: var(--panel-bg);
  box-shadow: var(--shadow);
  text-align: center;
}

.site-logo {
  display: block;
  width: min(180px, 50vw);
  height: auto;
  margin: 0 auto 1rem;
  padding: .2px;
  border: 1.5px solid rgba(180, 180, 180, 0.78);
  border-radius: 50%;
  background: #ffffff;
  box-shadow:
    4px 6px 10px rgba(50, 37, 12, 0.22),
    8px 12px 20px rgba(50, 37, 12, 0.14);
}

.login-card h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  font-weight: 600;
}

.intro {
  max-width: 44ch;
  margin: 0 auto 1rem;
  color: #444444;
}

.login-prompt {
  margin: 1.5rem auto 1rem;
  color: var(--muted);
  font-style: italic;
}

.login-form {
  width: min(100%, 420px);
  margin: 1.25rem auto 0;
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.form-row > label {
  font-weight: 600;
}

.form-row-checkbox {
  align-items: start;
}

.form-row-checkbox label {
  font-weight: normal;
}

.form-row-checkbox input {
  width: auto;
  min-height: auto;
  margin-right: 0.4rem;
}

.form-actions {
  margin-top: 1.25rem;
}

.login-form .form-actions {
  text-align: right;
}

/* Administration */

.admin-shell {
  width: min(100% - 2rem, 1280px);
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.admin-header {
  margin-bottom: 1rem;
}

.site-name {
  margin-bottom: 0.15rem;
  color: #425866;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-header h1 {
  margin-bottom: 0.25rem;
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  font-weight: 600;
}

.page-datetime {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  margin: 1.25rem 0;
}

.admin-nav form {
  margin: 0;
}

.link-button {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1f536f;
  font-weight: normal;
  text-decoration: underline;
}

.link-button:hover {
  border: 0;
  background: transparent;
  color: #102f40;
}

.admin-panel {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 1px solid rgba(105, 105, 105, 0.35);
  border-radius: 5px;
  background: var(--panel-bg);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
}

.admin-panel h2 {
  margin-bottom: 1.25rem;
  font-size: 1.35rem;
  font-weight: 600;
}

.user-form {
  width: min(100%, 650px);
}

.readonly-value {
  margin: 0;
  padding: 0.65rem 0;
}

.table-wrap {
  overflow-x: auto;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.users-table th,
.users-table td {
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.users-table th {
  background: var(--header-bg);
  color: #252525;
  font-weight: 700;
  white-space: nowrap;
}

.users-table tbody tr:nth-child(even) {
  background: rgba(245, 245, 245, 0.55);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 160px;
}

.table-actions form {
  margin: 0;
}

.table-actions .button {
  min-height: 34px;
  padding: 0.42rem 0.65rem;
  font-size: 0.85rem;
}

.current-user-label {
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .login-card,
  .admin-panel {
    padding: 1.25rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .form-row-checkbox {
    grid-template-columns: 1fr;
  }

  .form-row-checkbox > span {
    display: none;
  }

  .login-form .form-actions {
    text-align: left;
  }

  .gateway-page button,
  .gateway-page .button {
    width: 100%;
    text-align: center;
  }

  .table-actions .button {
    width: auto;
  }
}

@media (max-width: 760px) {
  .table-wrap {
    overflow: visible;
  }

  .users-table,
  .users-table tbody,
  .users-table tr,
  .users-table td {
    display: block;
    width: 100%;
  }

  .users-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .users-table {
    border: 0;
    background: transparent;
  }

  .users-table tbody {
    display: grid;
    gap: 1rem;
  }

  .users-table tr {
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.06);
  }

  .users-table td {
    display: grid;
    grid-template-columns: minmax(7rem, 38%) 1fr;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border: 0;
    border-bottom: 1px solid #e2e2e2;
  }

  .users-table td:last-child {
    border-bottom: 0;
  }

  .users-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
  }

  .users-table .table-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
  }

  .users-table .table-actions::before {
    display: none;
  }

  .users-table .table-actions form {
    margin: 0;
  }

  .users-table .table-actions .button {
    width: auto;
  }
}