/* Shared page layout */
* { box-sizing: border-box; }
body { margin: 0; padding: 20px; font: 15px/1.6 Arial, sans-serif; color: #333; background: #f4f6f9; }
h1, h2 { color: #0759a5; }
h1 { font-size: 25px; margin: 0 0 16px; }
h2 { font-size: 18px; margin: 24px 0 8px; }
a { color: #0759a5; }
.muted, .description, footer { color: #666; }
footer { margin-top: 24px; text-align: center; }

/* One container and one style for all navigation buttons */
.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; align-items: center; }
.buttons a, .buttons button, button { display: inline-block; padding: 8px 16px; border: 0; border-radius: 7px; background: #0759a5; color: white; font: inherit; font-weight: bold; text-align: center; text-decoration: none; cursor: pointer; }
.buttons a:hover, .buttons button:hover, button:hover { background: #03437f; }
button:disabled { opacity: .6; cursor: wait; }

/* Images */
.home-feature { display: block; max-width: 400px; margin: 24px 0; }
.home-feature img { display: block; max-width: 100%; height: auto; border-radius: 8px; }
.icon-nav { display: flex; flex-wrap: wrap; gap: 20px; }
.icon-link { text-align: center; text-decoration: none; }
.icon-link img { display: block; width: 56px; height: 56px; margin: auto; }

/* Forms (SMS, contact, uploader) */
/* Limit ordinary forms, not the full-width activity log */
form:not(.la-filters):not(#la-bulk-form) { max-width: 540px; }
.field { margin: 14px 0; }
.field label, .contact-form label { display: block; font-weight: bold; margin-bottom: 5px; }
.field input, .contact-form input, .contact-form textarea, select { display: block; width: 100%; padding: 10px; border: 1px solid #aaa; border-radius: 5px; font: inherit; }
.contact-form textarea { min-height: 150px; }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 15px 0; }
.check input { margin-top: 5px; }
.disclosure, .note { padding: 12px; background: #eaf3ff; border-radius: 6px; }
.notice { padding: 10px; margin: 12px 0; border-radius: 5px; background: #eaf3ff; }
.success { background: #d4edda; }
.error { background: #f8d7da; }
.contact-status { margin-top: 12px; white-space: pre-wrap; }
.contact-honey { position: absolute; left: -10000px; opacity: 0; }

/* Uploader-specific necessities */
.panel { max-width: 780px; }
.hint { color: #666; }
.danger { background: #a32835; }
.logout-form { margin-top: 15px; }
table { border-collapse: collapse; width: 100%; }
th, td { border-bottom: 1px solid #ddd; text-align: left; padding: 8px; overflow-wrap: anywhere; }
code { overflow-wrap: anywhere; }


html, body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

main {
    flex: 1;
}

.site-footer {
    margin-top: auto;
    padding: 5px;
    text-align: center;
    font-size: 13px;
    color: #666;
    border-top: 1px solid #ddd;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 5px;
}

.footer-links a {
    color: #0056b3;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}



/* Generic form panel */
.form-panel {
    width: 100%;
    max-width: 820px;
    margin: 20px auto;
    padding: 20px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 3px 10px #0002;
}

.form-panel h2 {
    margin-top: 0;
    color: #0056b3;
}

.form-panel label {
    display: block;
    margin: 12px 0 5px;
    font-weight: 600;
}

.form-panel input:not([type="checkbox"]):not([type="radio"]),
.form-panel select,
.form-panel textarea {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #aaa;
    border-radius: 5px;
    font: inherit;
}

.form-panel textarea {
    min-height: 120px;
}

.form-panel button {
    margin-top: 15px;
}


/*******************************************************
 Generic site header
*******************************************************/
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    padding: 10px 20px;
    margin-bottom: 20px;
    background: #f8fafc;
    border-bottom: 1px solid #d4dce5;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
}

/* Logo and title together on the left */
.site-header .site-header-brand {
    display: flex !important;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

/* Portrait oval image: limit styles to the logo link */
.site-header .site-header-logo {
    display: block;
    position: relative;
    width: 64px;
    height: 84px;
    flex: 0 0 64px;
    overflow: hidden;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.site-header .site-header-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
.site-header .site-header-logo::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.12);
    pointer-events: none;
}
.site-header h1 {
    margin: 0;
    color: #0056b3;
    font-size: 24px;
    font-weight: bold;
}

/* Username and auth link at far right */
.site-header .site-header-login {
    display: flex !important;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 14px;
}
.site-header-user { font-weight: bold; }
.site-header .site-header-auth-link {
    color: #0056b3;
    text-decoration: none;
}
.site-header .site-header-auth-link:hover { text-decoration: underline; }

@media (max-width: 600px) {
    .site-header { gap: 10px; padding: 8px 12px; }
    .site-header-brand { gap: 10px; }
    .site-header .site-header-logo {
        width: 54px;
        height: 72px;
        flex-basis: 54px;
    }
    .site-header h1 { font-size: 19px; }
    .site-header-login { font-size: 12px; }
}

/* Standard small blue button — shared across applications */
a.button.small.blue,
button.button.small.blue,
input[type="submit"].button.small.blue,
input[type="button"].button.small.blue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 30px;
    padding: 4px 12px;
    margin: 0;
    border: 1px solid #269ce9;
    border-radius: 4px;
    background: #269ce9;
    box-shadow: 0 1px 2px rgba(0,0,0,.15);
    color: #000;
    font: bold 13px Arial, Helvetica, sans-serif;
    line-height: 20px;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
a.button.small.blue:hover,
button.button.small.blue:hover,
input[type="submit"].button.small.blue:hover,
input[type="button"].button.small.blue:hover {
    background: #70b9e8;
    border-color: #269ce9;
    color: #000;
    text-decoration: none;
}
button.button.small.blue:disabled,
input.button.small.blue:disabled { opacity: .55; cursor: not-allowed; }

/* ===========================================
   SITE HEADER
   =========================================== */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    width: 100%;
    min-height: 115px;
    padding: 12px 15px;

    background: #f7f9fc;
    box-sizing: border-box;
}

/* Logo and title */

.site-header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.site-header-logo {
    display: block;
    flex-shrink: 0;
}

.site-header-logo img {
    display: block;
    width: 64px;
    height: 84px;
    object-fit: cover;

    border-radius: 50%;
    box-shadow: 0 3px 7px rgba(0,0,0,.30);
}

.site-header-brand h1 {
    margin: 0;
    color: #0055a5;
    font-size: 24px;
    font-weight: 700;
}

/* Right side container */

.site-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 30px;
    margin-left: auto;
    flex-shrink: 0;
}

/* Help and Contact */

.HeaderQuickLinks {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;

    flex: 0 0 auto;
    min-width: 0;
    padding: 0;
}

.HeaderQuickLinks a {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;

    min-width: 44px;
    padding: 7px 5px;

    text-decoration: none;
    color: #124c87;
    font-size: 12px;
    font-weight: 600;
    border-radius: 9px;

    transition: background-color .15s ease;
}

.HeaderQuickLinks a:hover,
.HeaderQuickLinks a:focus-visible {
    background: rgba(0, 85, 165, .08);
    outline-offset: 2px;
}

.HeaderQuickLinks svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Username and Logout */

.site-header-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;

    min-width: 55px;
    flex-shrink: 0;

    font-size: 13px;
}

.site-header-user {
    font-weight: 700;
    color: #222;
}

.site-header-auth-link {
    color: #0055a5;
    text-decoration: none;
}

.site-header-auth-link:hover {
    text-decoration: underline;
}

/* Mobile */

@media (max-width: 700px) {
    .site-header {
        gap: 8px;
        padding: 8px;
        min-height: 85px;
    }

    .site-header-brand {
        gap: 8px;
    }

    .site-header-logo img {
        width: 46px;
        height: 60px;
    }

    .site-header-brand h1 {
        font-size: 17px;
    }

    .site-header-actions {
        gap: 8px;
    }

    .HeaderQuickLinks {
        gap: 4px;
    }

    .HeaderQuickLinks a {
        min-width: 36px;
        font-size: 10px;
        padding: 4px 2px;
    }

    .HeaderQuickLinks svg {
        width: 20px;
        height: 20px;
    }

    .site-header-login {
        min-width: 40px;
        font-size: 11px;
    }
}

/**************************************************************************
************************************************************************/
.confirm-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9998;
}

.confirm-box {
  position: fixed;
  top: 200px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 25px 30px;
  border-radius: 12px;
  border: 2px solid red;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  min-width: 280px;
  text-align: center;
  z-index: 9999;
  color: black;
}

.confirm-buttons {
  margin-top: 20px;
}

.confirm-buttons button {
  padding: 10px 24px;
  margin: 0 8px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
 }
.confirm-buttons button:first-child {
  background: #d32f2f;
  color: white;
}

.confirm-buttons button:last-child {
  background: #666;
  color: white;
}