/* /account and /internal/accounts. Soft cards on the page background, Thermist palette. */

.acct-page {
    margin-top: var(--expanded-header-height);
    padding: 30px 20px 80px;
}

.acct-wrap {
    max-width: 760px;
    margin: 0 auto;
}

.acct-wrap.wide {
    max-width: 1180px;
}

.acct-wrap h1 {
    font-size: 2rem;
    font-weight: 500;
    text-align: left;
    margin: 0 0 22px;
    color: var(--primary-color);
}

.acct-lede {
    color: #555555;
    margin: 0 0 24px;
    font-size: 1rem;
}

/* ------------------------------------------------------------------ cards */

.acct-card {
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 24px 26px;
    margin-bottom: 20px;
}

.acct-card h2 {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #808080;
    margin: 0 0 16px;
}

.acct-card h3 {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--primary-color);
    margin: 0 0 6px;
}

.acct-card p {
    color: #555555;
    line-height: 1.55;
    margin: 0 0 10px;
}

.acct-card p:last-child {
    margin-bottom: 0;
}

.acct-hint {
    font-size: 0.85rem;
    color: #808080;
}

/* ------------------------------------------------------------------ profile */

.acct-profile {
    display: flex;
    align-items: center;
    gap: 16px;
}

.acct-who {
    flex: 1;
    min-width: 0;
}

.acct-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--thermist-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 500;
    overflow: hidden;
    flex-shrink: 0;
}

.acct-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.acct-name {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--primary-color);
}

.acct-email {
    color: #555555;
    font-size: 0.92rem;
    word-break: break-all;
}

/* ------------------------------------------------------------------ subscription */

.acct-subrow {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.acct-submain {
    flex: 1;
    min-width: 0;
}

.acct-plan {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 6px;
    line-height: 1.3;
}

.acct-meta {
    color: #555555;
    font-size: 0.92rem;
    line-height: 1.6;
    max-width: 46em;
}

/* A block inside a card below the first, e.g. the licensed users under the plan. */
.acct-section {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #f0f1f3;
}

.acct-section h3 {
    margin-bottom: 4px;
}

.acct-section .acct-hint {
    margin: 0 0 12px;
}

.pill {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    background-color: #eeeeee;
    color: #555555;
}

.pill.ok { background-color: #e3f6e8; color: #1f7a3d; }
.pill.warn { background-color: #fff3cd; color: #8b6914; }
.pill.bad { background-color: #fdecec; color: #a12622; }
.pill.info { background-color: #e6f3fe; color: var(--thermist-blue-dark); }

.acct-subbtns {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

/* Seat change stepper, opened by Change seats. */
.acct-stepper {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f0f1f3;
}

.acct-stepper .acct-in.tiny {
    width: 52px;
    text-align: center;
    padding: 7px 6px;
    -moz-appearance: textfield;
    appearance: textfield;
}
.acct-stepper .acct-in.tiny::-webkit-outer-spin-button,
.acct-stepper .acct-in.tiny::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.acct-stepper .acct-hint { margin-top: 8px; min-height: 1.2em; }

.acct-subnote { margin: 14px 0 0; }

/* ------------------------------------------------------------------ buttons */

.acct-btn {
    display: inline-block;
    box-sizing: border-box;
    padding: 11px 22px;
    border-radius: 8px;
    border: none;
    background-color: var(--thermist-blue);
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.acct-btn:hover:not(:disabled) {
    background-color: var(--thermist-blue-dark);
    text-decoration: none;
}

.acct-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.acct-btn.ghost {
    background-color: #fff;
    color: var(--thermist-blue);
    border: 1px solid var(--thermist-blue);
}

.acct-btn.ghost:hover:not(:disabled) {
    background-color: var(--thermist-blue-transparent);
}

.acct-btn.small {
    padding: 7px 14px;
    font-size: 0.85rem;
}

.acct-btn.danger {
    background-color: #fff;
    color: #a12622;
    border: 1px solid #f0c3c1;
}

.acct-btn.danger:hover:not(:disabled) {
    background-color: #fdecec;
}

.acct-linkbtn {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--thermist-blue);
    cursor: pointer;
    text-decoration: none;
}

.acct-linkbtn:hover {
    text-decoration: underline;
}

/* ------------------------------------------------------------------ seats */

.acct-seats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 16px;
}

.acct-seat {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.acct-seat-no {
    width: 22px;
    flex-shrink: 0;
    color: #808080;
    font-size: 0.85rem;
    text-align: right;
    padding-top: 11px;
}

.acct-seat-field {
    flex: 1;
    min-width: 0;
}

.acct-seat-status {
    font-size: 0.8rem;
    color: #808080;
    margin: 4px 0 0 2px;
}

.acct-seat-status.warn { color: #8b6914; }
.acct-seat-status.pending { color: var(--thermist-blue-dark); }

.acct-licdetail td {
    background: #fafafa;
    padding: 10px 12px 12px;
}

.acct-licrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 4px 0;
}

.acct-licrow .acct-seatname {
    min-width: 120px;
    font-size: 0.85rem;
}

.acct-licrow .acct-in {
    flex: none;
    width: 140px;
    padding: 6px 8px;
    font-size: 0.8rem;
}

.acct-in {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 13px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--primary-color);
    background-color: #fff;
}

.acct-in:focus {
    outline: none;
    border-color: var(--thermist-blue);
    box-shadow: 0 0 0 3px var(--thermist-blue-transparent);
}

.acct-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ------------------------------------------------------------------ banners */

.acct-banner {
    border-radius: 12px;
    padding: 13px 18px;
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
    background-color: var(--neutral-color);
    color: #555555;
}

.acct-banner.ok { background-color: #e3f6e8; border-color: #bfe6cb; color: #1f7a3d; }
.acct-banner.bad { background-color: #fdecec; border-color: #f5c2c0; color: #a12622; }
.acct-banner.info { background-color: #e6f3fe; border-color: #bfdefb; color: var(--thermist-blue-dark); }

/* ------------------------------------------------------------------ skeletons */

.sk {
    background-color: #e5e7eb;
    border-radius: 6px;
    animation: acct-pulse 1.4s ease-in-out infinite;
    display: block;
}

.sk + .sk { margin-top: 10px; }
.sk.line { height: 14px; }
.sk.title { height: 20px; width: 40%; }
.sk.w60 { width: 60%; }
.sk.w40 { width: 40%; }
.sk.w80 { width: 80%; }
.sk.circle { width: 56px; height: 56px; border-radius: 50%; }

@keyframes acct-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* ------------------------------------------------------------------ admin table */

.acct-tablewrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table.acct-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    min-width: 900px;
}

table.acct-table th {
    text-align: left;
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #808080;
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 10px;
    white-space: nowrap;
}

table.acct-table td {
    padding: 10px;
    border-bottom: 1px solid #f0f1f3;
    color: var(--primary-color);
    vertical-align: middle;
}

table.acct-table tr:last-child td {
    border-bottom: none;
}

table.acct-table input.acct-in {
    padding: 7px 10px;
    font-size: 0.85rem;
}

.acct-in.tiny { width: 70px; flex: none; }
.acct-in.grow { min-width: 220px; }

.acct-rowmsg {
    font-size: 0.8rem;
    white-space: nowrap;
}

.acct-rowmsg.ok { color: #1f7a3d; }
.acct-rowmsg.bad { color: #a12622; }

.acct-grantform {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.acct-grantform .acct-in { flex: none; width: 170px; }

.acct-empty {
    color: #808080;
    font-size: 0.9rem;
    padding: 12px 0;
}

@media (max-width: 600px) {
    .acct-card { padding: 20px 18px; }
    .acct-subrow { flex-direction: column; align-items: stretch; }
    .acct-subrow .acct-btn { width: 100%; }
    .acct-subbtns { justify-content: stretch; }
    .acct-wrap h1 { font-size: 1.6rem; }
    .acct-profile { flex-wrap: wrap; }
    .acct-profile #acct-signout { width: 100%; margin-top: 4px; }
}
