.max-420 {
    width: 100% !important;
    max-width: 420px !important;
}

@media (max-width: 600px) {
    input[type="button"],
    input[type="submit"] {
        display: inline-block;
        margin-top: 8px;
    }
}


/*-------------------------------------------------------
 * Contract HTML preview (version* classes) inside portal
-------------------------------------------------------*/

.ao-contract-preview .versionbody,
.ao-contract-preview .versiontext p,
.ao-contract-preview .versionheader b,
.ao-contract-preview .versiontext b {
    font-family: Calibri, sans-serif;
    font-size: 17px;
    color: #171717;
    line-height: 140%;
}

.ao-contract-preview .versiontitle {
    font-family: Calibri, sans-serif;
    font-size: 28px;
    color: #171717;
    line-height: 1.3;
    margin-bottom: 20px;
}

.ao-contract-preview .versionsubheader {
    font-family: Calibri, sans-serif;
    font-size: 17px;
    color: #171717;
    font-weight: bold;
    margin: 20px 0 8px 0;
}

.ao-contract-preview .versiontextmissing {
    background-color: #eeebea;
    color: #cc0000;
}

.ao-contract-preview .versionindent {
    padding-left: 40px;
}

.ao-contract-preview .versionhide {
    display: none;
}

/*-------------------------------------------------------
 * Validation
-------------------------------------------------------*/
.text-danger {
    color: red;
    font-weight: bold;
    font-size: 16px;
}

/*-------------------------------------------------------
 * Portal pages (dark theme matching the static site)
-------------------------------------------------------*/

.ao-portal-section {
    background-color: #22262a;
    padding: 60px 30px;
    max-width: 860px;
    margin: 0 auto;
}

.ao-portal-header {
    text-align: center;
    margin-bottom: 50px;
}

.ao-portal-intro {
    font-family: Roboto, sans-serif;
    font-size: 18px;
    line-height: 160%;
    font-weight: 300;
    color: #aaa;
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.ao-portal-empty {
    font-family: Roboto, sans-serif;
    font-size: 20px;
    line-height: 160%;
    font-weight: 300;
    color: #fff;
    text-align: center;
    padding: 40px 0;
}

.ao-member-section-label {
    font-family: Roboto, sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.ao-member-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 20px;
    margin-bottom: 8px;
}

.ao-portal-section--light .ao-member-card--deleted {
    background-color: #f5f5f2;
    border-color: #e8e8e4;
}

.ao-portal-section--light .ao-member-card--deleted .ao-member-name {
    color: #aaa;
}

.ao-portal-section--light .ao-member-card--deleted .ao-member-detail {
    color: #bbb;
}

.ao-member-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ao-member-name {
    font-family: Roboto, sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    line-height: 1.3;
}

.ao-member-detail {
    font-family: Roboto, sans-serif;
    font-size: 14px;
    font-weight: 300;
    color: #888;
    line-height: 1.4;
}

.ao-portal-section--light .ao-member-card {
    background-color: #fff;
    border: 1px solid #e0e0da;
}

.ao-portal-section--light .ao-member-name {
    color: #22262a;
}

.ao-portal-section--light .ao-member-detail {
    color: #666;
}

.ao-member-actions .link-button,
.ao-member-actions .link-button:hover,
.ao-sub-card-actions .link-button,
.ao-sub-card-actions .link-button:hover {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 1;
}

/*-------------------------------------------------------
 * Portal pages — light mode variant
-------------------------------------------------------*/

.ao-portal-section--light {
    background-color: #f5f6f3;
    padding: 60px 30px;
    max-width: 860px;
    margin: 0 auto;
}

.ao-portal-section--light input[type="submit"],
.ao-portal-section--light input[type="button"] {
    font-family: Roboto, sans-serif;
    font-size: 12px;
    font-weight: 500;
    background: none;
    border: 1px solid #bbb;
    border-radius: 3px;
    color: #171717;
    height: auto;
    padding: 7px 14px;
    cursor: pointer;
    letter-spacing: 0.3px;
    width: auto !important;
    white-space: normal;
    text-transform: none;
}

.ao-portal-section--light input[type="submit"]:hover,
.ao-portal-section--light input[type="button"]:hover {
    background-color: #f0f0ec;
    border-color: #22262a;
    color: #22262a;
}

.ao-heading-dark {
    color: #22262a !important;
}

.ao-heading-dark::after {
    background-color: #22262a !important;
}

.ao-portal-intro--dark {
    color: #171717;
}

.ao-portal-stats {
    font-family: Roboto, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #171717;
    text-align: center;
    margin-top: 16px;
    letter-spacing: 0.5px;
}

.ao-stats-divider {
    color: #bbb;
    margin: 0 4px;
}

.ao-portal-stats-warning {
    color: #c0392b;
}

.ao-portal-success {
    font-family: Roboto, sans-serif;
    font-size: 16px;
    color: #27ae60;
    font-weight: 500;
    text-align: center;
    margin-bottom: 24px;
}

.ao-portal-empty--dark {
    color: #171717;
}

.ao-sub-card {
    background-color: #fff;
    border: 1px solid #e0e0da;
    padding: 20px 24px;
    margin-bottom: 12px;
}

.ao-sub-card--ended .ao-sub-card-header,
.ao-sub-card--ended .ao-sub-card-body {
    opacity: 0.55;
}

.ao-sub-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
}

.ao-sub-name {
    font-family: Roboto, sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #22262a;
}

.ao-sub-status {
    font-family: Roboto, sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #171717;
    margin-left: 8px;
}

.ao-sub-dates {
    font-family: Roboto, sans-serif;
    font-size: 13px;
    font-weight: 300;
    color: #171717;
    white-space: nowrap;
}

.ao-sub-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 16px;
}

.ao-sub-detail {
    font-family: Roboto, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #171717;
    line-height: 1.5;
    text-decoration: none;
}

a.ao-sub-detail:hover {
    color: #22262a;
    text-decoration: underline;
}

.ao-sub-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f0f0ec;
    padding-top: 12px;
}


.ao-sub-card-actions .link-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 1;
}

/*-------------------------------------------------------
 * Detail edit sections
-------------------------------------------------------*/

.ao-detail-card {
    background-color: #fff;
    border: 1px solid #e0e0da;
    padding: 20px 24px;
    margin-bottom: 12px;
}

.ao-detail-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.ao-detail-edit-btn {
    font-family: Roboto, sans-serif;
    font-size: 12px;
    font-weight: 500;
    background: none;
    border: 1px solid #bbb;
    border-radius: 3px;
    color: #171717;
    padding: 7px 14px;
    cursor: pointer;
    letter-spacing: 0.3px;
    text-decoration: none;
}

.ao-detail-edit-btn:hover {
    background-color: #f0f0ec;
    border-color: #22262a;
    color: #22262a;
    text-decoration: none;
}

/* Primary (green) variant — add alongside ao-detail-edit-btn or alone on inputs */
.ao-detail-edit-btn.ao-btn-primary,
.ao-portal-section--light input.ao-btn-primary {
    background-color: rgb(61, 115, 73);
    color: white;
    border-color: rgb(61, 115, 73);
    font-style: normal;
}

.ao-detail-edit-btn.ao-btn-primary:hover,
.ao-portal-section--light input.ao-btn-primary:hover {
    background-color: rgb(130, 168, 83);
    color: white;
    border-color: rgb(130, 168, 83);
}

.ao-portal-section--light input.ao-btn-primary:disabled {
    background-color: rgb(61, 115, 73);
    color: white;
    border-color: rgb(61, 115, 73);
    font-style: normal;
    opacity: 0.55;
}

.ao-portal-section--light input.ao-detail-edit-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Card with drop shadow — used on contract signing flow panels */
.ao-sig-card {
    box-shadow: 1px 2px 5px #d9dde0;
}

.ao-detail-view {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ao-detail-note {
    font-family: Roboto, sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #171717;
    line-height: 1.6;
    margin-bottom: 14px;
}

.ao-detail-note a {
    color: #171717;
}

.ao-detail-note a:hover {
    color: #22262a;
}

.ao-detail-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ao-portal-section--light .ao-detail-form input::-webkit-input-placeholder {
    color: #999;
    text-transform: none;
}
.ao-portal-section--light .ao-detail-form input::-moz-placeholder {
    color: #999;
    text-transform: none;
    opacity: 1;
}
.ao-portal-section--light .ao-detail-form input::placeholder {
    color: #999;
    text-transform: none;
}

.ao-detail-form input[type="text"],
.ao-detail-form input[type="email"],
.ao-detail-form input[type="password"],
.ao-detail-form input[type="date"],
.ao-detail-form textarea,
.ao-detail-form select {
    width: 100%;
    max-width: 380px;
    font-size: 15px;
    font-family: Roboto, sans-serif;
    padding: 7px 6px;
    height: auto;
    border: 1px solid #d0d0cc;
    color: #22262a;
    background-color: #fafafa;
    margin: 0;
}

.ao-detail-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ao-detail-form label {
    font-family: Roboto, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.ao-detail-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

/*-------------------------------------------------------
 * Icon-only add button
-------------------------------------------------------*/

/*-------------------------------------------------------
 * Drummers Edit
-------------------------------------------------------*/
select.drummers-time {
    display: inline;
    width: 204px;
}

/*-------------------------------------------------------
 * Riva chat typing animation
-------------------------------------------------------*/
@keyframes typing-bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}
