/* =====================================================
   BuddyBuddy – Global Site Styles
   Theme: Light Blue + White | Font: Poppins 12px
   ===================================================== */

/* ── CSS Variables ─────────────────────────────────── */
:root {
    --bb-primary:       #2196F3;
    --bb-primary-dark:  #1565C0;
    --bb-primary-light: #E3F2FD;
    --bb-accent:        #03A9F4;
    --bb-white:         #FFFFFF;
    --bb-bg:            #F0F8FF;
    --bb-sidebar-bg:    #1976D2;
    --bb-sidebar-text:  #FFFFFF;
    --bb-sidebar-hover: rgba(255,255,255,0.15);
    --bb-card-shadow:   0 2px 12px rgba(33,150,243,0.10);
    --bb-border-radius: 10px;
    --bb-font-size:     12px;
    --bb-transition:    0.25s ease;
}

/* ── Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    font-family: 'Poppins', sans-serif;
    font-size: var(--bb-font-size);
    background-color: var(--bb-bg);
    color: #37474F;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

a { color: var(--bb-primary); text-decoration: none; }
a:hover { color: var(--bb-primary-dark); }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

/* ── Auth Pages ───────────────────────────────────── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 50%, #90CAF9 100%);
    padding: 1.5rem;
}

.auth-card {
    background: var(--bb-white);
    border-radius: var(--bb-border-radius);
    box-shadow: 0 8px 40px rgba(33,150,243,0.18);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem 2rem;
}

.auth-card .brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.auth-card .brand-logo .brand-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bb-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--bb-white);
    margin-right: 0.6rem;
}

.auth-card .brand-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--bb-primary);
    margin: 0;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: #78909C;
    font-size: 11px;
    margin-bottom: 1.5rem;
    margin-top: -0.5rem;
}

.auth-card .form-label {
    font-size: 11px;
    font-weight: 600;
    color: #546E7A;
    margin-bottom: 0.3rem;
}

.auth-card .form-control {
    font-size: 12px;
    border-radius: 8px;
    border: 1.5px solid #BBDEFB;
    padding: 0.55rem 0.85rem;
    transition: border-color var(--bb-transition), box-shadow var(--bb-transition);
}

.auth-card .form-control:focus {
    border-color: var(--bb-primary);
    box-shadow: 0 0 0 0.18rem rgba(33,150,243,0.18);
}

.auth-card .input-group-text {
    background: var(--bb-primary-light);
    border: 1.5px solid #BBDEFB;
    border-right: none;
    color: var(--bb-primary);
    border-radius: 8px 0 0 8px;
    font-size: 12px;
}

.auth-card .input-group .form-control {
    border-left: none;
    border-radius: 0 8px 8px 0;
}

.auth-card .input-group .form-control:focus {
    border-left: none;
}

.auth-card .btn-primary-bb {
    background: var(--bb-primary);
    border: none;
    color: var(--bb-white);
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    width: 100%;
    transition: background var(--bb-transition), transform var(--bb-transition);
    letter-spacing: 0.3px;
}

.auth-card .btn-primary-bb:hover {
    background: var(--bb-primary-dark);
    transform: translateY(-1px);
}

.auth-links {
    text-align: center;
    margin-top: 1rem;
    font-size: 11px;
    color: #78909C;
}

.auth-links a {
    color: var(--bb-primary);
    font-weight: 600;
}

/* ── Admin Layout ─────────────────────────────────── */
.bb-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.bb-sidebar {
    width: 240px;
    background: var(--bb-sidebar-bg);
    color: var(--bb-sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1040;
    transition: transform var(--bb-transition), width var(--bb-transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.bb-sidebar.collapsed { width: 60px; }

.bb-sidebar-brand {
    display: flex;
    align-items: center;
    padding: 1.2rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    min-height: 64px;
}

.bb-sidebar-brand .brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.bb-sidebar-brand .brand-text {
    font-size: 1rem;
    font-weight: 700;
    margin-left: 0.7rem;
    white-space: nowrap;
    transition: opacity var(--bb-transition);
}

.bb-sidebar.collapsed .brand-text { opacity: 0; pointer-events: none; }

.bb-nav {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    flex: 1;
}

.bb-nav-link {
    display: flex;
    align-items: center;
    padding: 0.7rem 1rem;
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background var(--bb-transition), border-color var(--bb-transition), color var(--bb-transition);
    white-space: nowrap;
    text-decoration: none;
}

.bb-nav-link i {
    width: 22px;
    font-size: 13px;
    text-align: center;
    flex-shrink: 0;
}

.bb-nav-link .nav-label {
    margin-left: 0.65rem;
    transition: opacity var(--bb-transition), width var(--bb-transition);
    overflow: hidden;
}

.bb-sidebar.collapsed .nav-label { opacity: 0; width: 0; }

.bb-nav-link:hover,
.bb-nav-link.active {
    background: var(--bb-sidebar-hover);
    border-left-color: var(--bb-white);
    color: var(--bb-white);
}

.bb-nav-section {
    padding: 0.8rem 1rem 0.3rem;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
    overflow: hidden;
    transition: opacity var(--bb-transition);
}

.bb-sidebar.collapsed .bb-nav-section { opacity: 0; }

/* Main content */
.bb-main {
    flex: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--bb-transition);
    min-width: 0;
}

.bb-main.sidebar-collapsed { margin-left: 60px; }

/* Topbar */
.bb-topbar {
    background: var(--bb-white);
    border-bottom: 1px solid #E3F2FD;
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 2px 6px rgba(33,150,243,0.08);
}

.bb-topbar .toggle-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--bb-primary);
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    margin-right: 1rem;
    border-radius: 6px;
    transition: background var(--bb-transition);
}

.bb-topbar .toggle-btn:hover { background: var(--bb-primary-light); }

.bb-topbar .page-title {
    font-size: 14px;
    font-weight: 600;
    color: #37474F;
    margin: 0;
    flex: 1;
}

.bb-topbar .topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bb-topbar .user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bb-topbar .user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bb-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
}

.bb-topbar .user-name {
    font-size: 11px;
    font-weight: 600;
    color: #546E7A;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bb-topbar .user-role {
    font-size: 10px;
    color: #90A4AE;
}

/* Page content */
.bb-content {
    padding: 1.5rem;
    flex: 1;
}

.bb-page-header {
    margin-bottom: 1.5rem;
}

.bb-page-header h1 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #37474F;
    margin: 0 0 0.2rem;
}

.bb-page-header .breadcrumb {
    font-size: 11px;
    margin: 0;
    padding: 0;
    background: none;
}

.bb-page-header .breadcrumb-item.active { color: #90A4AE; }

/* ── Stat Cards ───────────────────────────────────── */
.stat-card {
    background: var(--bb-white);
    border-radius: var(--bb-border-radius);
    box-shadow: var(--bb-card-shadow);
    padding: 1.2rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: box-shadow var(--bb-transition), transform var(--bb-transition);
}

.stat-card:hover {
    box-shadow: 0 6px 24px rgba(33,150,243,0.18);
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-card .stat-info .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    color: #37474F;
}

.stat-card .stat-info .stat-label {
    font-size: 11px;
    color: #90A4AE;
    margin-top: 0.2rem;
}

.stat-icon-blue   { background: #E3F2FD; color: var(--bb-primary); }
.stat-icon-green  { background: #E8F5E9; color: #43A047; }
.stat-icon-orange { background: #FFF3E0; color: #FB8C00; }
.stat-icon-purple { background: #EDE7F6; color: #7B1FA2; }

/* ── Generic Card ─────────────────────────────────── */
.bb-card {
    background: var(--bb-white);
    border-radius: var(--bb-border-radius);
    box-shadow: var(--bb-card-shadow);
    overflow: hidden;
}

.bb-card-header {
    background: var(--bb-primary-light);
    border-bottom: 1px solid #BBDEFB;
    padding: 0.85rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bb-card-header h5 {
    font-size: 12px;
    font-weight: 700;
    color: var(--bb-primary-dark);
    margin: 0;
}

.bb-card-body { padding: 1.2rem; }

/* ── Password Toggle ──────────────────────────────── */
.password-wrapper { position: relative; }
.password-wrapper .toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #90A4AE;
    cursor: pointer;
    padding: 0;
    font-size: 13px;
    z-index: 5;
}

/* ── Alerts ───────────────────────────────────────── */
.alert { font-size: 12px; border-radius: 8px; }

/* ── Forms (global) ───────────────────────────────── */
.form-control, .form-select {
    font-size: 12px;
    font-family: 'Poppins', sans-serif;
    border-radius: 8px;
}

.btn {
    font-size: 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border-radius: 8px;
}

/* ── Responsive Mobile ────────────────────────────── */
@media (max-width: 991.98px) {
    .bb-sidebar {
        transform: translateX(-100%);
        width: 240px !important;
    }
    .bb-sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,0.25);
    }
    .bb-main { margin-left: 0 !important; }
    .bb-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1039;
    }
    .bb-overlay.active { display: block; }
    .bb-content { padding: 1rem; }
}

@media (max-width: 575.98px) {
    .auth-card { padding: 1.8rem 1.2rem; }
    .stat-card .stat-info .stat-value { font-size: 1.3rem; }
}


.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}