/* Adapted from the supplied LIAS Identity profile layout and component styles. */
@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("assets/roboto-latin.woff2") format("woff2");
}

:root {
    --primary: #4b55f6;
    --primary-dark: #30379d;
    --text: #414141;
    --surface: #fff;
    --background: #f4f4f8;
    --border: #e0e0e0;
    --menu-active: #eeeefc;
    --avatar: #7f54b4;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--surface);
    font: .875rem/1.5 "Roboto", sans-serif;
}

a {
    color: var(--primary);
}

button, input, select {
    font: inherit;
}

h1, h2 {
    font-weight: 700;
    line-height: 1.35;
}

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

h2 {
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .28px;
    margin: 0 0 1rem;
}

p {
    margin: 0 0 1.5rem;
}

/* Reference MyProfileLayout: centred 64rem card on the LIAS background. */
.admin-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    background: url("assets/background.jpg") center / cover no-repeat fixed;
}

.shell {
    display: grid;
    grid-template-columns: 254px minmax(0, 1fr);
    width: 64rem;
    max-width: 100%;
    min-height: 775px;
    margin: 2.5rem 0;
    background: var(--surface);
    border-radius: .375rem;
    box-shadow: 0 3px 30px rgb(75 85 246 / 9%);
}

.sidebar {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
}

.sidebar-identity {
    min-height: 224px;
    padding: 1.5rem 1.5rem 1.25rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.identity-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text);
    text-decoration: none;
}

.identity-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    margin: 1rem 0;
    border-radius: 50%;
    background: var(--avatar);
    color: white;
    font-size: 2rem;
    font-weight: 600;
}

.identity-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.session-action {
    display: inline-block;
    color: #000;
    font: bold 16px/20px "Roboto", sans-serif;
    letter-spacing: .1px;
    text-transform: uppercase;
    text-decoration: none;
}

nav {
    padding: 1.5rem;
}

.nav-title {
    font: bold 14px/16px "Roboto", sans-serif;
    letter-spacing: .28px;
    margin-bottom: 1rem;
}

nav a {
    display: block;
    padding: 8px 12px;
    border-radius: 5px;
    color: var(--text);
    font: 500 13px/16px "Roboto", sans-serif;
    text-decoration: none;
    transition: background-color .15s ease;
}

nav .active {
    background: var(--menu-active);
    color: var(--primary);
}

nav a:hover, .workflow-row:hover, tbody tr:hover {
    background: #f8f8ff;
}

.sidebar-brand {
    display: block;
    margin: auto auto 0;
    padding: 1.5rem;
}

.admin-content {
    min-width: 0;
    padding: 1.5rem;
    width: 100%;
}

.overview-section {
    margin-top: 2rem;
}

.row-panel, .panel, .table-wrap {
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
}

.panel {
    padding: 1.25rem;
}

.workflow-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 10px 24px 10px 15px;
    min-height: 60px;
    color: var(--text);
    text-decoration: none;
}

.workflow-row + .workflow-row, .detail-row + .detail-row {
    border-top: 1px solid var(--border);
}

.workflow-row strong, .workflow-row > span > span {
    display: block;
}

.workflow-row strong {
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .42px;
    margin-bottom: 4px;
}

.workflow-row > span > span {
    font-size: .85rem;
    letter-spacing: .42px;
}

.row-arrow {
    font-size: 1.4rem;
    color: #000;
    flex-shrink: 0;
}

.detail-list {
    margin: 0;
}

.detail-row {
    min-height: 60px;
    padding: 10px 24px 10px 15px;
}

dt {
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .42px;
    margin-bottom: 4px;
}

dd {
    font-size: .85rem;
    letter-spacing: .42px;
    margin: 0;
    overflow-wrap: anywhere;
}

form {
    max-width: 46rem;
}

.entity-form {
    border: 1px solid var(--border);
    border-radius: .3rem;
    padding: 1.25rem 1.5rem 1.5rem;
}

label {
    display: block;
    font-size: .875rem;
    font-weight: 700;
    margin: 1rem 0 .5rem;
}

input:not([type=checkbox]), select {
    width: 100%;
    padding: .65rem 1rem;
    border: 1px solid var(--border);
    border-radius: .3rem;
    min-height: 2.9375rem;
    background: white;
    color: var(--text);
}

input[type=checkbox] {
    width: 1.1rem;
    height: 1.1rem;
    vertical-align: middle;
    accent-color: var(--primary);
}

input[readonly] {
    background: #fafafa;
}

input:focus, select:focus {
    border-color: var(--primary);
}

button, .button {
    display: inline-block;
    background: var(--primary);
    color: white;
    border: 0;
    border-radius: .3rem;
    font-weight: 700;
    padding: .65rem 1.25rem;
    margin: .75rem .5rem 0 0;
    cursor: pointer;
    text-decoration: none;
}

button:hover, .button:hover {
    background: var(--primary-dark);
}

.danger {
    background: #a12626;
}

.danger:hover {
    background: #7d1b1b;
}

:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin: 1rem 0 1.5rem;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: .875rem;
    letter-spacing: .03em;
}

caption {
    text-align: left;
    font-weight: 700;
    padding: 1rem;
}

th, td {
    text-align: left;
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--border);
    overflow-wrap: anywhere;
}

th {
    font-size: .875rem;
    background: var(--surface);
}

tbody tr:last-child td {
    border-bottom: 0;
}

.error, .validation-message, .validation-errors {
    color: #8e1616;
}

.error, .success, .notice {
    padding: 1rem;
    border: 1px solid currentColor;
    border-radius: .3rem;
    background: white;
}

.success {
    color: #236035;
}

.help {
    font-size: .875rem;
    margin: .5rem 0 1rem;
}

.skip {
    position: absolute;
    top: -100px;
    background: white;
    padding: .5rem;
    z-index: 20;
}

.skip:focus {
    top: 0;
}

#loading {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    padding: 1rem;
    background: var(--primary-dark);
    color: white;
}

/* The unauthenticated login retains the public LIAS Identity login treatment. */
.login-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: url("assets/background.jpg") center / cover no-repeat fixed;
    padding: 1.25rem 1rem;
}

.logo-container {
    display: flex;
    justify-content: center;
    margin: 1.25rem 0 2.5rem;
}

.login-card {
    width: 31.5rem;
    max-width: 100%;
    background: var(--surface);
    border-radius: .375rem;
    box-shadow: 0 3px 30px rgb(75 85 246 / 9%);
    padding: 2.5rem;
    margin-bottom: 2.5rem;
}

.login-card h1 {
    text-align: center;
    margin: 0 0 2rem;
    font-size: 2rem;
    font-weight: 900;
}

.login-card p {
    font-size: .875rem;
}

.login-card button {
    width: 100%;
    margin: 1.25rem 0 0;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .admin-layout {
        display: block;
        padding: 0;
        background: var(--surface);
    }

    .shell {
        grid-template-columns: 1fr;
        width: 100%;
        min-height: 100vh;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-identity {
        min-height: 0;
        padding: 1rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }

    .identity-link {
        flex-direction: row;
        gap: .75rem;
        text-align: left;
    }

    .identity-avatar {
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1.1rem;
        margin: 0;
        flex-shrink: 0;
    }

    .identity-name {
        font-size: 1rem;
        margin-bottom: 0;
    }

    .session-action {
        margin: 0;
        font-size: .875rem;
    }

    nav {
        padding: 1rem;
        display: flex;
        flex-wrap: wrap;
        gap: .2rem;
    }

    .nav-title {
        width: 100%;
        margin-bottom: .5rem;
    }

    nav a {
        margin: 0;
    }

    .sidebar-brand {
        display: none;
    }

    .admin-content {
        padding: 1.5rem 1rem 2rem;
    }

    .entity-form {
        padding: 1rem;
    }

    .workflow-row {
        gap: 1rem;
    }

    .login-layout {
        background: var(--surface);
        justify-content: flex-start;
    }

    .logo-container {
        margin: 1.25rem 0 0;
    }

    .login-card {
        width: 100%;
        padding: 2rem 1rem;
        background: transparent;
        box-shadow: none;
    }

}

button:disabled { background: #777; color: #fff; cursor: not-allowed; opacity: .65; }
