/* Shared look for the Silex pages. Colours follow the site:
   #302a39 nav, #4586ff primary, #03b040 success, #d9534f error, #f9f9fa page. */

/* ---------- Participant pages ---------- */
/* Hides the Register.Master top bar. Other pages on that master keep it, as they don't load this file. */
nav.header {
    display: none;
}

.sf-body {
    background-color: #f9f9fa;
}

.sf-page {
    font-family: Tahoma, sans-serif;
}

.sf-page {
    max-width: 960px;
    margin: 32px auto 56px;
    color: #302a39;
    text-align: left;
}

.sf-page-narrow {
    max-width: 560px;
}

/* Intro band */
.sf-hero {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 28px 32px;
    background-color: #302a39;
    border-bottom: 4px solid #4586ff;
    border-radius: 8px 8px 0 0;
}

.sf-hero-logo {
    flex: 0 0 auto;
    width: 96px;
    height: 96px;
    padding: 4px;
    background-color: #fff;
    border-radius: 8px;
}

.sf-hero-text {
    flex: 1 1 auto;
    min-width: 0;
}

.sf-type {
    display: block;
    margin-bottom: 4px;
    color: #d9d6de;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.sf-page .sf-title {
    margin: 0 0 6px;
    color: #fff;
    font-family: inherit;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
}

.sf-lead,
.sf-page .sf-lead p {
    margin: 0;
    color: #d9d6de;
    font-size: 15px;
    line-height: 1.5;
}

/* Panel under the band */
.sf-panel {
    padding: 28px 32px 32px;
    background-color: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 7px 25px 1px rgba(0, 0, 0, 0.08);
}

.sf-page .sf-section-title {
    margin: 0 0 4px;
    color: #302a39;
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
}

.sf-page .sf-note {
    margin: 0 0 20px;
    color: #5f5a68;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
}

.sf-section + .sf-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e3e1e7;
}

/* Messages */
.sf-page .sf-msg {
    margin: 0 0 20px;
    padding: 12px 16px;
    border: 1px solid #4586ff;
    border-radius: 6px;
    background-color: #eef4ff;
    color: #302a39;
    font-size: 14px;
    line-height: 1.5;
}

    .sf-page .sf-msg p {
        margin: 0;
        font-size: inherit;
    }

    .sf-page .sf-msg:empty {
        display: none;
    }

    .sf-page .sf-msg.is-error {
        border-color: #d9534f;
        background-color: #fdf1f0;
    }

    .sf-page .sf-msg.is-success {
        border-color: #03b040;
        background-color: #ecf9f1;
    }

/* Form fields */
.sf-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
}

.sf-grid-one {
    grid-template-columns: minmax(0, 1fr);
}

/* Server-side wrappers holding several fields: let the fields sit in the grid directly. */
.sf-contents {
    display: contents;
}

.sf-field {
    min-width: 0;
}

.sf-field-wide {
    grid-column: 1 / -1;
}

.sf-page label,
.sa-page .sa-field label {
    display: block;
    margin: 0 0 6px;
    color: #302a39;
    font-size: 14px !important;
    font-weight: 700;
    line-height: 1.3;
}

.sf-page label.is-required::after {
    content: " *";
    color: #d9534f;
}

.sf-page .form-control {
    height: 40px;
    padding: 8px 12px;
    border: 1px solid #c9c5d0;
    border-radius: 6px;
    box-shadow: none;
    color: #302a39;
    font-size: 14px;
    line-height: 1.4;
}

    .sf-page .form-control:focus {
        border-color: #4586ff;
        box-shadow: 0 0 0 3px rgba(69, 134, 255, 0.2);
    }

    .sf-page .form-control[disabled] {
        border-color: #e3e1e7;
        background-color: #f9f9fa;
        color: #302a39;
        opacity: 1;
        cursor: default;
    }

.sf-page .txtother {
    margin-top: 8px;
}

.sf-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.sf-actions-between {
    justify-content: space-between;
}

/* Buttons, shared with the admin pages */
.sf-page .sf-btn,
.sa-page .sf-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    text-transform: none;
    white-space: normal;
}

    .sf-page .sf-btn:focus-visible,
    .sa-page .sf-btn:focus-visible {
        outline: 3px solid #4586ff;
        outline-offset: 2px;
    }

.sf-page .sf-btn-primary,
.sa-page .sf-btn-primary {
    border: 1px solid #4586ff;
    background: #4586ff;
    color: #fff;
}

    .sf-page .sf-btn-primary:hover,
    .sf-page .sf-btn-primary:focus,
    .sa-page .sf-btn-primary:hover,
    .sa-page .sf-btn-primary:focus {
        border-color: #302a39;
        background: #302a39;
        color: #fff;
    }

.sf-page .sf-btn-plain,
.sa-page .sf-btn-plain {
    border: 1px solid #c9c5d0;
    background: #fff;
    color: #302a39;
}

    .sf-page .sf-btn-plain:hover,
    .sf-page .sf-btn-plain:focus,
    .sa-page .sf-btn-plain:hover,
    .sa-page .sf-btn-plain:focus {
        border-color: #302a39;
        background: #fff;
        color: #302a39;
    }

.sa-page .sf-btn-danger {
    border: 1px solid #d9534f;
    background: #fff;
    color: #b52b27;
}

    .sa-page .sf-btn-danger:hover,
    .sa-page .sf-btn-danger:focus {
        background: #d9534f;
        color: #fff;
    }

/* A link with nothing to open yet, such as an ID card that is not ready */
.sf-page a.sf-btn:not([href]),
.sf-page a.sf-btn[href=""] {
    border-color: #e3e1e7;
    background: #e3e1e7;
    color: #5f5a68;
    cursor: default;
    pointer-events: none;
}

.sf-page .sf-link {
    color: #2a66d9;
    font-weight: 700;
    text-decoration: underline;
}

    .sf-page .sf-link:hover,
    .sf-page .sf-link:focus {
        color: #302a39;
    }

.sf-page .sf-text {
    color: #5f5a68;
    font-size: 14px;
}

/* Photo on the Complete page */
.sf-photo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.sf-page .imgprof {
    width: 120px;
    height: 120px;
    border: 1px solid #e3e1e7;
    border-radius: 50%;
    background-color: #f9f9fa;
    object-fit: cover;
}

/* Result panels: dashboard and ID card */
.sf-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 20px;
    border: 1px solid #e3e1e7;
    border-radius: 8px;
    background-color: #f9f9fa;
    text-align: center;
}

.sf-result-logo {
    width: 96px;
    height: 96px;
    margin-bottom: 16px;
}

.sf-page .sf-result .sf-section-title {
    text-align: center;
}

.sf-page .sf-result .sf-note {
    text-align: center;
}

/* Only shown while the download link above it has nowhere to go */
.sf-not-ready {
    display: none;
    margin-top: 12px;
    color: #5f5a68;
    font-size: 14px;
}

a.sf-btn:not([href]) ~ .sf-not-ready,
a.sf-btn[href=""] ~ .sf-not-ready {
    display: block;
}

.sf-dash {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.sf-dash-data {
    min-width: 0;
    overflow-x: auto;
}

/* ---------- Admin and college pages ---------- */
.sa-page {
    color: #302a39;
}

.sa-head {
    margin-bottom: 16px;
    padding: 18px 24px;
    background-color: #302a39;
    border-bottom: 4px solid #4586ff;
    border-radius: 8px;
    color: #fff;
}

.sa-page .sa-title {
    margin: 0;
    color: #fff;
    font-family: inherit;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}

.sa-page .sa-sub {
    margin: 4px 0 0;
    color: #d9d6de;
    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
}

    .sa-page .sa-sub:empty {
        display: none;
    }

.sa-card {
    margin-bottom: 16px;
    padding: 20px 24px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.sa-page .sa-card-title {
    margin: 0 0 14px;
    color: #302a39;
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
}

.sa-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

    .sa-columns > .sa-card {
        margin-bottom: 0;
    }

.sa-columns-gap {
    margin-bottom: 16px;
}

.sa-filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px 16px;
}

.sa-field {
    min-width: 0;
}

.sa-page .form-control {
    height: 36px;
    border: 1px solid #c9c5d0;
    border-radius: 6px;
    box-shadow: none;
    color: #302a39;
    font-size: 14px;
}

    .sa-page .form-control:focus {
        border-color: #4586ff;
        box-shadow: 0 0 0 3px rgba(69, 134, 255, 0.2);
    }

.sa-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.sa-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.sa-toolbar-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sa-summary {
    max-width: 420px;
    margin-top: 16px;
}

.sa-upload {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

    .sa-upload input[type="file"] {
        flex: 1 1 200px;
        min-width: 0;
        height: auto;
        padding: 6px 8px;
    }

.sa-invoice {
    margin-top: 10px;
}

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

.sa-page .table {
    margin-bottom: 0;
    background-color: #fff;
    border-color: #e3e1e7;
    font-size: 14px;
}

    .sa-page .table > tbody > tr > th,
    .sa-page .table > thead > tr > th {
        border-color: #4a4356;
        background-color: #302a39;
        color: #fff;
        font-weight: 700;
        white-space: nowrap;
    }

    .sa-page .table > tbody > tr > td {
        border-color: #e3e1e7;
        vertical-align: middle;
    }

/* Inside a cell: dropdown with its Update button */
.sa-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 200px;
}

    .sa-inline .form-control {
        flex: 1 1 auto;
        min-width: 0;
    }

.sa-page .sa-btn-small {
    padding: 6px 10px;
    border: 1px solid #c9c5d0;
    border-radius: 6px;
    background: #fff;
    color: #302a39;
    font-size: 13px;
    font-weight: 700;
}

    .sa-page .sa-btn-small:hover:enabled,
    .sa-page .sa-btn-small:focus:enabled {
        border-color: #302a39;
    }

    .sa-page .sa-btn-small:disabled {
        background: transparent;
        color: #5f5a68;
        cursor: not-allowed;
    }

/* GridView pager */
.sa-page .grindNumber > td {
    background-color: #f9f9fa;
}

.sa-page .grindNumber table td {
    padding: 2px;
    border: 0;
}

.sa-page .grindNumber a,
.sa-page .grindNumber span {
    display: inline-block;
    min-width: 32px;
    padding: 5px 9px;
    border: 1px solid #c9c5d0;
    border-radius: 6px;
    background: #fff;
    color: #302a39;
    text-align: center;
}

.sa-page .grindNumber span {
    border-color: #302a39;
    background: #302a39;
    color: #fff;
}

.sa-page .zoom {
    transition: all ease 0.3s;
}

    .sa-page .zoom:hover {
        transform: scale(3);
    }

.sa-form-narrow {
    max-width: 720px;
}

/* ---------- Small screens ---------- */
@media (max-width: 767px) {
    .sf-page {
        margin: 16px auto 32px;
    }

    .sf-hero {
        gap: 16px;
        padding: 20px;
    }

    .sf-hero-logo {
        width: 72px;
        height: 72px;
    }

    .sf-page .sf-title {
        font-size: 22px;
    }

    .sf-panel {
        padding: 20px 16px 24px;
    }

    .sf-grid,
    .sf-dash,
    .sa-columns {
        grid-template-columns: minmax(0, 1fr);
    }

    /* 16px stops phones zooming in on the field when it is tapped */
    .sf-page .form-control {
        font-size: 16px;
    }

    .sf-actions .sf-btn {
        width: 100%;
    }

    .sa-card {
        padding: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sa-page .zoom {
        transition: none;
    }
}
