/* =====================================================================
   LogisCore Host – Identity Server stylesheet
   Self-contained: no Bootstrap dependency.
   ===================================================================== */

/* ----- Base reset ----- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.42857143;
    color: #333;
    background-color: #fff;
}

input,
button,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

a {
    color: #337ab7;
    text-decoration: none;
}

a:hover,
a:focus {
    color: #23527c;
    text-decoration: underline;
}

h1 {
    font-size: 36px;
    font-weight: 500;
    line-height: 1.1;
    margin: 0.67em 0;
}

@media (max-width: 767px) {
    h1 {
        font-size: 30px;
    }
}

/* ----- Layout ----- */
.container.body-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 15px;
}

footer p {
    color: #777;
    font-size: 13px;
}

/* ----- Navbar ----- */
.main-navbar {
    background-color: #006272;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 960px;
    margin: 0 auto;
    height: 50px;
}

.nav-brand {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
}

.nav-brand:hover,
.nav-brand:focus {
    color: #ddd;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #fff;
    padding: 14px 12px;
    display: block;
    text-decoration: none;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus {
    color: #cce5ec;
    text-decoration: none;
}

.nav-caret {
    font-size: 10px;
    margin-left: 4px;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    min-width: 140px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-link {
    display: block;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}

.nav-dropdown-link:hover {
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nav-toggle-icon {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

@media (max-width: 767px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 50px;
        left: 0;
        right: 0;
        background: #006272;
        padding: 8px 0;
        gap: 0;
        z-index: 99;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: #004d5e;
    }

    .nav-dropdown-link {
        color: #fff;
        padding: 10px 24px;
    }

    .nav-dropdown-link:hover {
        background: #003d4d;
        color: #fff;
    }
}

/* ----- Page header ----- */
.page-header {
    padding-bottom: 9px;
    margin: 20px 0 10px;
    border-bottom: 1px solid #eee;
}

/* ----- Generic action button ----- */
.btn-action {
    display: inline-block;
    padding: 6px 20px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    background-color: #006272;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

.btn-action:hover,
.btn-action:focus {
    background-color: #004d5e;
    color: #fff;
    text-decoration: none;
}

/* ----- Alerts ----- */
.alert {
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-danger {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}

.alert-info {
    color: #31708f;
    background-color: #d9edf7;
    border-color: #bce8f1;
}

/* ----- Utility ----- */
.text-danger {
    color: #a94442;
}

/* ----- Error page ----- */
.error-page .request-id {
    margin-top: 8px;
    font-size: 12px;
    color: #777;
}

/* ----- Consent page ----- */
.page-consent {
    max-width: 700px;
}

.consent-form {
    margin-top: 16px;
}

.consent-section {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 16px;
    overflow: hidden;
}

.consent-section-title {
    background: #f5f5f5;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 1px solid #ddd;
}

.consent-scope-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.consent-scope-list li {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.consent-scope-list li:last-child {
    border-bottom: none;
}

.consent-scopecheck {
    margin-right: 8px;
}

.consent-description {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}

.consent-remember {
    margin: 16px 0;
}

.consent-buttons {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* ----- Consent / Grants buttons ----- */
.btn {
    display: inline-block;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 400;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #333;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.42857143;
}

.btn:hover,
.btn:focus {
    background: #e6e6e6;
    color: #333;
    text-decoration: none;
}

.btn-primary {
    background-color: #006272;
    border-color: #004d5e;
    color: #fff;
    font-weight: bold;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #004d5e;
    color: #fff;
}

.btn-danger {
    background-color: #d9534f;
    border-color: #d43f3a;
    color: #fff;
}

.btn-danger:hover,
.btn-danger:focus {
    background-color: #c9302c;
    color: #fff;
}

/* ----- Grants page ----- */
.grants .grant {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    align-items: flex-start;
}

.grants .grant:last-child {
    border-bottom: none;
}

.grants .grant img {
    max-width: 80px;
    height: auto;
}

.grants .grant .grant-info {
    flex: 1;
}

.grants .clientname {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.grants .created,
.grants .expires {
    font-weight: 600;
}

.grants .granttype {
    font-weight: 600;
    margin-top: 6px;
}

.grants ul {
    margin: 4px 0 0 0;
    padding-left: 20px;
}

.grants .grant-revoke {
    flex-shrink: 0;
}

.welcome-page {
    max-width: 700px;
}

.logged-out {
    margin-bottom: 12px;
}

.logout-page {
    max-width: 500px;
}

.logout-page fieldset {
    border: none;
    padding: 0;
    margin: 16px 0 0;
}
