/* ================================
   Custom Bootstrap 4 Theme Overrides
   Palette: 
   Primary   #762b94
   Secondary #f5841e
   White     #ffffff
   ================================ */

/* -----------------
   Buttons
------------------ */
.btn-primary {
    background-color: #762b94 !important;
    border-color: #762b94 !important;
    color: #ffffff !important;
    /* force white text */
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #5e2176 !important;
    /* darker purple */
    border-color: #5e2176 !important;
    color: #ffffff !important;
    /* keep white text */
}

.btn-secondary {
    background-color: #f5841e !important;
    border-color: #f5841e !important;
    color: #ffffff !important;
    /* white text for better contrast */
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
    background-color: #c86616 !important;
    /* darker orange */
    border-color: #c86616 !important;
    color: #ffffff !important;
}

/* -----------------
   Default Button (custom)
------------------ */
.btn-default {
    background-color: #ffffff !important;
    border: 1px solid #762b94 !important;
    color: #762b94 !important;
}

.btn-default:hover,
.btn-default:focus,
.btn-default:active {
    background-color: #762b94 !important;
    border-color: #762b94 !important;
    color: #ffffff !important;
    /* white text on hover */
}

/* -----------------
   Backgrounds
------------------ */
.bg-primary {
    background-color: #762b94 !important;
}

.bg-primary:hover {
    background-color: #5e2176 !important;
}

.bg-secondary {
    background-color: #f5841e !important;
}

.bg-secondary:hover {
    background-color: #c86616 !important;
}

.bg-light {
    background-color: #ffffff !important;
}

/* -----------------
   Text
------------------ */
.text-primary {
    color: #762b94 !important;
}

.text-primary:hover {
    color: #5e2176 !important;
}

.text-secondary {
    color: #f5841e !important;
}

.text-secondary:hover {
    color: #c86616 !important;
}

.text-light {
    color: #ffffff !important;
}

/* -----------------
   Links
------------------ */
a,
.link-primary {
    color: #762b94 !important;
    text-decoration: none;
}

a:hover,
.link-primary:hover {
    color: #5e2176 !important;
    text-decoration: underline;
}

.link-secondary {
    color: #f5841e !important;
    text-decoration: none;
}

.link-secondary:hover {
    color: #c86616 !important;
    text-decoration: underline;
}

/* -----------------
   Borders
------------------ */
.border-primary {
    border-color: #762b94 !important;
}

.border-secondary {
    border-color: #f5841e !important;
}

/* -----------------
   Alerts
------------------ */
.alert-primary {
    background-color: #762b94 !important;
    color: #ffffff !important;
    border-color: #5e2176 !important;
}

.alert-secondary {
    background-color: #f5841e !important;
    color: #ffffff !important;
    border-color: #c86616 !important;
}

/* -----------------
   Badges
------------------ */
.badge-primary {
    background-color: #762b94 !important;
}

.badge-secondary {
    background-color: #f5841e !important;
}

/* -----------------
   Pagination
------------------ */
.page-item.active .page-link {
    background-color: #762b94 !important;
    border-color: #762b94 !important;
      color: #fff !important;
}

.page-link {
    color: #762b94 !important;
}

.page-link:hover {
    color: #5e2176 !important;
}

/* -----------------
   Navbar
------------------ */
.navbar-light .navbar-nav .nav-link.active,
.navbar-light .navbar-nav .show>.nav-link {
    color: #762b94 !important;
}

.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .show>.nav-link {
    color: #f5841e !important;
}

/* General nav/side menu active link */
.nav .nav-link.active,
.nav .nav-link[aria-current="page"],
.nav-pills .nav-link.active,
.nav-pills .show>.nav-link,
.dropdown-menu .dropdown-item.active,
.list-group-item.active,
.sidebar .nav-link.active,
/* common sidebar class */
.sidebar .menu .nav-link.active {
    /* extra safety */
    background-color: #762b94 !important;
    color: #ffffff !important;
    border-color: #762b94 !important;
}

/* Ensure nested text/icons inside active item turn white too */
.nav .nav-link.active *,
.sidebar .nav-link.active * {
    color: #ffffff !important;
}

/* Hover/Focus on active item (slightly darker) */
.nav .nav-link.active:hover,
.nav .nav-link.active:focus,
.dropdown-menu .dropdown-item.active:hover,
.list-group-item.active:hover {
    background-color: #5e2176 !important;
    color: #ffffff !important;
}

/* Default (non-active) link colors in menus */
.nav .nav-link,
.dropdown-menu .dropdown-item {
    color: #762b94 !important;
}

.nav .nav-link:hover,
.dropdown-menu .dropdown-item:hover {
    color: #5e2176 !important;
    background-color: rgba(118, 43, 148, 0.08) !important;
    /* subtle hover */
}

/* =============================================================================
   Auth Experience Revamp
   ============================================================================= */
:root {
    --brand-primary: #762b94;
    --brand-primary-dark: #5e2176;
    --brand-primary-light: #a46bc9;
    --brand-secondary: #f5841e;
    --brand-surface: #ffffff;
    --brand-muted: #8f81a3;
    --brand-heading: #201533;
    --brand-body: #3b2f4d;
}

body.auth-layout {
    font-family: "Poppins", "Source Sans Pro", "Segoe UI", sans-serif;
   /* background: linear-gradient(140deg, #4c1470 0%, #762b94 45%, #a975d1 100%);*/
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
    color: var(--brand-body);
}

.auth-shell {
    width: 100%;
    max-width: 1100px;
    background: var(--brand-surface);
    border-radius: 32px;
    box-shadow: 0 32px 70px rgba(38, 7, 66, 0.35);
    display: flex;
    overflow: hidden;
    position: relative;
}

.auth-hero {
    flex: 1.1;
    background: linear-gradient(180deg, #9f51c8 0%, #762b94 55%, #5e2176 100%);
    color: #ffffff;
    padding: 72px 56px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 32px;
}

.auth-hero::before,
.auth-hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    opacity: 0.15;
}

.auth-hero::before {
    width: 220px;
    height: 220px;
    background: #ffffff;
    top: 16%;
    right: 12%;
}

.auth-hero::after {
    width: 320px;
    height: 320px;
    background: rgba(255, 255, 255, 0.45);
    bottom: -140px;
    left: -80px;
}

.auth-hero-content {
    position: relative;
    z-index: 1;
    max-width: 360px;
}

.auth-hero-greeting {
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 12px;
}

.auth-hero-heading {
    font-size: 34px;
    font-weight: 600;
    line-height: 1.18;
    margin-bottom: 12px;
}

.auth-hero-subtext {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
}

.auth-hero-note {
    margin-top: 48px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.74);
    position: relative;
    z-index: 1;
}

.auth-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--brand-surface);
    position: relative;
}

.auth-card-body {
    padding: 64px 72px 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.auth-card-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-eyebrow {
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    color: var(--brand-muted);
}

.auth-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--brand-heading);
    margin: 0;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--brand-muted);
    margin: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.auth-form label,
.auth-form .form-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-muted);
    margin: 0;
}

.auth-form .form-control {
    border-radius: 12px;
    border: 1px solid rgba(118, 43, 148, 0.22);
    padding: 12px 16px;
    font-size: 15px;
    color: var(--brand-body);
    background: rgba(118, 43, 148, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-form .form-control:focus {
    border-color: var(--brand-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(118, 43, 148, 0.18);
}

.auth-form .invalid-feedback {
    display: block;
    font-size: 12px;
    font-weight: 500;
}

.auth-form .auth-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--brand-muted);
    flex-wrap: wrap;
    gap: 12px;
}

.auth-form .auth-form-options a {
    color: var(--brand-primary);
    font-weight: 600;
}

.auth-form .btn {
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 18px 40px rgba(118, 43, 148, 0.25);
}

.auth-grid {
    display: grid;
    gap: 18px;
}

.auth-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-meta {
    font-size: 13px;
    color: var(--brand-muted);
    text-align: center;
}

.auth-meta a {
    font-weight: 600;
}

.auth-card-footer {
    padding: 24px 72px 48px;
    text-align: center;
    font-size: 12px;
    color: var(--brand-muted);
    border-top: 1px solid rgba(118, 43, 148, 0.08);
}

.auth-alert {
    border-radius: 14px;
    border: 1px solid rgba(118, 43, 148, 0.18);
    background: rgba(118, 43, 148, 0.08);
    padding: 12px 16px;
    font-size: 13px;
    color: var(--brand-body);
}

.auth-alert.alert-success {
    border-color: rgba(54, 179, 126, 0.24);
    background: rgba(54, 179, 126, 0.18);
    color: #176343;
}

.auth-alert.alert-danger,
.auth-alert.alert-error {
    border-color: rgba(220, 53, 69, 0.32);
    background: rgba(220, 53, 69, 0.18);
    color: #861b25;
}

.auth-guidelines {
    background: rgba(118, 43, 148, 0.08);
    border: 1px solid rgba(118, 43, 148, 0.18);
    border-radius: 16px;
    padding: 16px 20px;
    font-size: 13px;
    color: var(--brand-body);
}

.auth-guidelines ul {
    margin: 0;
    padding-left: 18px;
}

@media (max-width: 1199.98px) {
    .auth-card-body {
        padding: 52px 48px 32px;
    }

    .auth-card-footer {
        padding: 20px 48px 36px;
    }
}

@media (max-width: 991.98px) {
    .auth-shell {
        flex-direction: column;
        border-radius: 24px;
    }

    .auth-hero {
        display: none;
    }

    .auth-card-body {
        padding: 40px 32px 28px;
    }

    .auth-card-footer {
        padding: 18px 32px 28px;
    }
}

@media (max-width: 575.98px) {
    body.auth-layout {
        padding: 24px 12px;
    }

    .auth-card-body {
        padding: 32px 24px 24px;
    }

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

    .auth-grid.two-col {
        grid-template-columns: 1fr;
    }
}

body.auth-layout .select2-container--default .select2-selection--single {
    border-radius: 12px;
    border: 1px solid rgba(118, 43, 148, 0.22);
    height: 46px;
    padding: 8px 12px;
}

body.auth-layout .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px;
    color: var(--brand-body);
}

body.auth-layout .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px;
    right: 10px;
}
