/* =========================================================
   PROFESSIONAL LIBRARY PORTAL - FORMS & AUTHENTICATION
   Green + White Institutional Theme
   Main Green: rgb(36, 175, 54)
   ========================================================= */


/* =========================================================
   FORM GROUPS
   ========================================================= */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;

    color: var(--slate-700, #334155);

    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.4;
}

.form-group label .required {
    color: #dc2626;
    margin-left: 3px;
}


/* =========================================================
   FORM CONTROLS
   ========================================================= */

.form-control {
    width: 100%;
    min-height: 46px;

    padding: 11px 14px;

    border: 1px solid var(--slate-300, #cbd5e1);
    border-radius: 10px;

    background: #ffffff;
    color: var(--slate-700, #334155);

    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.4;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:hover {
    border-color: #94a3b8;
}

.form-control:focus {
    border-color: rgb(36, 175, 54);

    background-color: #ffffff;

    box-shadow:
        0 0 0 3px rgba(36, 175, 54, 0.14);
}

.form-control:disabled {
    background-color: #f1f5f9;
    color: #94a3b8;

    cursor: not-allowed;
}


/* =========================================================
   SELECT
   ========================================================= */

select.form-control,
.form-select {
    width: 100%;
    min-height: 46px;

    padding: 11px 38px 11px 14px;

    border: 1px solid var(--slate-300, #cbd5e1);
    border-radius: 10px;

    background-color: #ffffff;
    color: var(--slate-700, #334155);

    font-family: inherit;
    font-size: 0.9rem;

    cursor: pointer;
    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

select.form-control:focus,
.form-select:focus {
    border-color: rgb(36, 175, 54);

    box-shadow:
        0 0 0 3px rgba(36, 175, 54, 0.14);
}


/* =========================================================
   TEXTAREA
   ========================================================= */

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}


/* =========================================================
   CHECKBOX & RADIO
   ========================================================= */

.form-check {
    display: flex;
    align-items: center;

    gap: 8px;
    margin-bottom: 12px;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 16px;
    height: 16px;

    accent-color: rgb(36, 175, 54);

    cursor: pointer;
}

.form-check label {
    margin: 0;

    color: var(--slate-600, #475569);

    font-size: 0.84rem;

    cursor: pointer;
}


/* =========================================================
   FORM HELP TEXT
   ========================================================= */

.form-text,
.form-help {
    display: block;

    margin-top: 6px;

    color: var(--slate-500, #64748b);

    font-size: 0.76rem;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    min-height: 44px;

    padding: 10px 18px;

    border: 1px solid transparent !important;
    border-radius: 10px;

    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 700;

    text-align: center;
    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}


/* =========================================================
   PRIMARY BUTTON
   ========================================================= */

.btn-primary {
    background: rgb(36, 175, 54) !important;
    background-color: rgb(36, 175, 54) !important;

    color: #ffffff !important;

    border-color: rgb(36, 175, 54) !important;

    box-shadow:
        0 4px 12px rgba(36, 175, 54, 0.20);
}

.btn-primary:hover,
.btn-primary:focus {
    background: rgb(30, 145, 44) !important;
    background-color: rgb(30, 145, 44) !important;

    color: #ffffff !important;

    border-color: rgb(30, 145, 44) !important;

    box-shadow:
        0 6px 16px rgba(36, 175, 54, 0.28);

    transform: translateY(-1px);
}


/* =========================================================
   SECONDARY BUTTON
   ========================================================= */

.btn-secondary {
    background: #ffffff !important;
    background-color: #ffffff !important;

    color: rgb(36, 175, 54) !important;

    border: 1px solid rgb(36, 175, 54) !important;
    border-color: rgb(36, 175, 54) !important;

    box-shadow: none;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: #f0fff2 !important;
    background-color: #f0fff2 !important;

    color: rgb(30, 145, 44) !important;

    border-color: rgb(30, 145, 44) !important;
}


/* =========================================================
   SUCCESS BUTTON
   ========================================================= */

.btn-success {
    background: rgb(36, 175, 54) !important;
    background-color: rgb(36, 175, 54) !important;

    color: #ffffff !important;

    border-color: rgb(36, 175, 54) !important;

    box-shadow:
        0 4px 12px rgba(36, 175, 54, 0.18);
}

.btn-success:hover,
.btn-success:focus {
    background: rgb(30, 145, 44) !important;
    background-color: rgb(30, 145, 44) !important;

    color: #ffffff !important;

    border-color: rgb(30, 145, 44) !important;
}


/* =========================================================
   DANGER BUTTON
   ========================================================= */

.btn-danger {
    background: #dc2626 !important;
    background-color: #dc2626 !important;

    color: #ffffff !important;

    border-color: #dc2626 !important;
}

.btn-danger:hover,
.btn-danger:focus {
    background: #b91c1c !important;
    background-color: #b91c1c !important;

    color: #ffffff !important;

    border-color: #b91c1c !important;
}


/* =========================================================
   OUTLINE GREEN BUTTON
   ========================================================= */

.btn-outline-primary {
    background: #ffffff !important;
    background-color: #ffffff !important;

    color: rgb(36, 175, 54) !important;

    border: 1px solid rgb(36, 175, 54) !important;
    border-color: rgb(36, 175, 54) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: rgb(36, 175, 54) !important;
    background-color: rgb(36, 175, 54) !important;

    color: #ffffff !important;

    border-color: rgb(36, 175, 54) !important;
}


/* =========================================================
   FULL WIDTH BUTTON
   ========================================================= */

.btn-block {
    display: flex;
    width: 100%;
}


/* =========================================================
   ALERTS
   ========================================================= */

.alert {
    position: relative;

    padding: 13px 16px;
    margin-bottom: 20px;

    border-radius: 10px;

    border: 1px solid transparent;

    font-size: 0.84rem;
    line-height: 1.5;
}


/* Danger */

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}


/* Success */

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}


/* Warning */

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}


/* Information */

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}


/* =========================================================
   AUTHENTICATION PAGE
   ========================================================= */

.auth-wrapper {
    min-height: 100vh;
    width: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 30px 20px;

    background:
        radial-gradient(
            circle at top left,
            rgba(36, 175, 54, 0.10),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            #f0fff2 0%,
            #f8fafc 50%,
            #ffffff 100%
        );
}


/* =========================================================
   AUTHENTICATION CARD
   ========================================================= */

.auth-card {
    width: 100%;
    max-width: 430px;

    padding: 34px;

    background: #ffffff;

    border: 1px solid var(--slate-200, #e2e8f0);

    border-radius: 18px;

    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.09),
        0 4px 12px rgba(15, 23, 42, 0.04);

    position: relative;

    overflow: hidden;
}


/* =========================================================
   GREEN TOP ACCENT
   ========================================================= */

.auth-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 4px;

    background: rgb(36, 175, 54);
}


/* =========================================================
   AUTHENTICATION HEADER
   ========================================================= */

.auth-header {
    text-align: center;

    margin-bottom: 28px;
}

.auth-logo {
    width: 72px;
    height: 72px;

    margin: 0 auto 15px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #f0fff2;

    border: 1px solid rgba(36, 175, 54, 0.20);

    border-radius: 16px;

    overflow: hidden;
}

.auth-logo img {
    max-width: 80%;
    max-height: 80%;

    object-fit: contain;
}

.auth-header h2 {
    margin: 0;

    color: rgb(36, 175, 54);

    font-size: 1.45rem;
    font-weight: 800;

    line-height: 1.3;
}

.auth-header p {
    margin: 7px 0 0;

    color: var(--slate-500, #64748b);

    font-size: 0.82rem;
}


/* =========================================================
   AUTHENTICATION FOOTER
   ========================================================= */

.auth-footer {
    margin-top: 22px;

    padding-top: 18px;

    border-top: 1px solid var(--slate-100, #f1f5f9);

    text-align: center;

    color: var(--slate-500, #64748b);

    font-size: 0.78rem;
}

.auth-footer a {
    color: rgb(36, 175, 54);

    font-weight: 700;

    text-decoration: none;
}

.auth-footer a:hover {
    color: rgb(30, 145, 44);

    text-decoration: underline;
}


/* =========================================================
   PASSWORD FIELD
   ========================================================= */

.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;

    top: 50%;
    right: 12px;

    transform: translateY(-50%);

    border: 0;

    background: transparent;

    color: var(--slate-500, #64748b);

    cursor: pointer;

    font-size: 1rem;

    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: rgb(36, 175, 54);
}


/* =========================================================
   FORM ROW
   ========================================================= */

.form-row {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 16px;
}


/* =========================================================
   RESPONSIVE - TABLET / MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .auth-wrapper {
        padding: 20px 14px;
    }

    .auth-card {
        max-width: 100%;

        padding: 27px 20px;

        border-radius: 14px;
    }

    .auth-header h2 {
        font-size: 1.25rem;
    }

    .form-row {
        grid-template-columns: 1fr;

        gap: 0;
    }

    .form-control,
    select.form-control,
    .form-select {
        min-height: 44px;
    }

    .btn {
        width: 100%;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

    .auth-card {
        padding: 24px 16px;
    }

    .auth-logo {
        width: 62px;
        height: 62px;
    }

    .auth-header h2 {
        font-size: 1.15rem;
    }

    .form-control {
        font-size: 0.86rem;
    }

    .btn {
        min-height: 42px;

        padding: 9px 14px;

        font-size: 0.82rem;
    }
}