/* Cadmus — minimal, tap-friendly stylesheet for 360 px screens */

/* ------------------------------------------------------------------ */
/* Base                                                               */
/* ------------------------------------------------------------------ */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 1rem;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
  background: #ffffff;
}

/* Centered container on wide screens */
#people,
#admin-organizations,
#admin-audit,
#admin-connect-repo,
#admin-repo-settings {
  max-width: 700px;
  margin: 0 auto;
}

/* ------------------------------------------------------------------ */
/* Links — tappable                                                   */
/* ------------------------------------------------------------------ */

a {
  color: #005fcc;
  text-decoration: underline;
  padding: 0.25em 0.1em;
}

/* ------------------------------------------------------------------ */
/* Buttons and submit controls — 44 px tap targets                    */
/* ------------------------------------------------------------------ */

button,
input[type="submit"],
input[type="button"] {
  min-height: 44px;
  padding: 0.5rem 1rem;
  font-size: 16px;
  border: 1px solid #888;
  border-radius: 4px;
  background: #f5f5f5;
  cursor: pointer;
  width: 100%;
  text-align: center;
}

button[type="submit"],
input[type="submit"] {
  margin-top: 0.5rem;
}

/* Make inline button groups stack on narrow screens */
form > button[type="submit"] {
  width: auto;
}

/* ------------------------------------------------------------------ */
/* Forms — stacked fields, full-width inputs                          */
/* ------------------------------------------------------------------ */

form div {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  font-size: 16px;
  padding: 0.5rem;
  border: 1px solid #888;
  border-radius: 4px;
  min-height: 44px;
}

/* ------------------------------------------------------------------ */
/* Lists — prevent overflow on narrow screens                         */
/* ------------------------------------------------------------------ */

ul {
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}

li {
  overflow-wrap: anywhere;
  margin-bottom: 0.5rem;
}

/* ------------------------------------------------------------------ */
/* Tables — internal scroll container                                 */
/* ------------------------------------------------------------------ */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  min-width: 640px;
  border-collapse: collapse;
  width: 100%;
}

.table-wrap th,
.table-wrap td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid #ddd;
  white-space: nowrap;
}

.table-wrap th {
  font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Headings                                                           */
/* ------------------------------------------------------------------ */

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

h2 {
  margin: 1rem 0 0.5rem;
  font-size: 1.2rem;
}

/* ------------------------------------------------------------------ */
/* Paragraphs                                                         */
/* ------------------------------------------------------------------ */

p {
  margin: 0.5rem 0;
}

/* ------------------------------------------------------------------ */
/* Sign-out form — inline button                                      */
/* ------------------------------------------------------------------ */

form[action="/sign-out"] button {
  width: auto;
}

/* ------------------------------------------------------------------ */
/* Hidden / inline forms                                              */
/* ------------------------------------------------------------------ */

form[style*="inline"],
form[style*="inline-block"] {
  display: inline;
}
