/*
 * Kinetic Core — shared styles for server-rendered Thymeleaf pages
 * (login, OAuth consent, OAuth error).
 *
 * Design tokens are derived from the Kinetic Platform console
 * (Plus Jakarta Sans, indigo primary, light-grey background, card layout).
 */

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

/* Base */
body {
    font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: #242f4d;
    background-color: #f4f5f7;
    margin: 0;
    padding: 0;
}

/* Card container */
.login-container {
    background-color: #fff;
    border-radius: .5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .16);
    margin: 8vh auto 0;
    padding: 2.5rem;
    width: 510px;
    max-width: calc(100% - 2rem);
}

/* Logo */
.login-logo {
    display: block;
    margin: 0 auto 1.5rem;
    max-width: 180px;
    height: auto;
}

/* Typography */
h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
}

h2 {
    font-size: .875rem;
    font-weight: 600;
    margin: 1rem 0 .5rem;
}

/* Form */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: .375rem;
    font-weight: 600;
    font-size: .875rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: .4375rem 1rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #242f4d;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced0d2;
    border-radius: .25rem;
    appearance: none;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.form-control:focus {
    border-color: #3f46d6;
    outline: 0;
    box-shadow: 0 0 0 .25rem rgba(63, 70, 214, .16);
}
.form-control::placeholder {
    color: #68778f;
    opacity: 1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .4375rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: .25rem;
    text-decoration: none;
    transition: color .15s ease-in-out, background-color .15s ease-in-out,
                border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: #3f46d6;
    border-color: #3f46d6;
}
.btn-primary:hover {
    background-color: #363cb6;
    border-color: #3238ab;
}
.btn-primary:focus {
    background-color: #363cb6;
    border-color: #3238ab;
    box-shadow: 0 0 0 .25rem rgba(92, 98, 220, .5);
}

.btn-outline {
    color: #242f4d;
    background-color: #fff;
    border-color: #ced0d2;
}
.btn-outline:hover {
    background-color: #f4f5f7;
    border-color: #ced0d2;
}

/* Login button (centered) */
.login-button {
    text-align: center;
    width: 100%;
    margin-top: 1.5rem;
}
.login-button .btn {
    justify-content: center;
    min-width: 55%;
}

/* Action button row (consent approve/deny) */
.actions {
    display: flex;
    gap: .75rem;
    margin-top: 1.5rem;
}
.actions .btn { flex: 1; }

/* Alerts */
.alert {
    padding: .75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: .25rem;
}
.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

/* Consent page specifics */
.client-logo {
    max-width: 80px;
    max-height: 80px;
    border-radius: .25rem;
    margin-bottom: .75rem;
}
.client-description { color: #68778f; margin: 0 0 .25rem; }
.client-access { margin: 0 0 .25rem; }
.signed-in { color: #68778f; font-size: .875rem; margin: 0 0 1rem; }

.scopes {
    list-style: none;
    padding: 0;
    margin: 0 0 .5rem;
}
.scopes li {
    padding: .5rem 0;
    border-bottom: 1px solid #ced0d2;
}
.scopes li:last-child { border-bottom: 0; }
.scope-name { font-weight: 600; }
.scope-desc { color: #68778f; font-size: .875rem; margin-top: .125rem; }
