/**
 * Bilal Tailor — brand logo & layout theme
 * Gold-on-black logo works with dark sidebar / dark topbar (default BTMS layout).
 */

:root {
    --btms-gold: #c9a227;
    --btms-gold-light: #e8c96a;
    --btms-brand-dark: #0a0a0a;
    --btms-brand-panel: #111111;
}

.btms-logo-img {
    height: 40px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    vertical-align: middle;
}

.btms-brand-logo--sidebar .btms-logo-img,
.btms-brand-logo--topbar .btms-logo-img {
    height: 38px;
    max-width: 140px;
}

body[data-sidebar-size="sm"] .btms-brand-logo--sidebar .btms-logo-img {
    height: 34px;
    max-width: 42px;
}

.btms-logo-img--auth {
    height: 88px;
    max-width: 240px;
}

.btms-brand-logo--auth .logo-txt {
    color: var(--btms-gold) !important;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
}

.btms-brand-logo .logo-txt {
    color: var(--btms-gold);
    font-weight: 700;
    font-size: 1rem;
    margin-left: 0.35rem;
    vertical-align: middle;
}

body[data-layout="vertical"][data-sidebar="dark"] .vertical-menu .navbar-brand-box,
body[data-sidebar="dark"] .vertical-menu .navbar-brand-box {
    background-color: var(--btms-brand-dark) !important;
    border-bottom: 1px solid rgba(201, 162, 39, 0.15);
}

body[data-layout="vertical"][data-topbar="dark"] .navbar-brand-box,
body[data-topbar="dark"] #page-topbar.isvertical-topbar .navbar-brand-box {
    background-color: var(--btms-brand-dark) !important;
}

body[data-sidebar="light"] .vertical-menu .navbar-brand-box {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-bottom: 1px solid rgba(201, 162, 39, 0.2);
}

body[data-sidebar="light"] .vertical-menu .navbar-brand-box .logo-txt {
    color: var(--btms-gold-light);
}

.auth-page .auth-logo.btms-brand-logo,
.authentication-bg .btms-brand-logo--auth {
    margin-bottom: 0.5rem;
}

.auth-page {
    background-color: #0a0a0a;
}

.auth-page .auth-bg {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1510 50%, #0a0a0a 100%) !important;
}

.auth-page .auth-bg .bg-overlay.bg-primary {
    background: rgba(10, 10, 10, 0.55) !important;
}

.btn-primary {
    background-color: #a8841a;
    border-color: #a8841a;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--btms-gold);
    border-color: var(--btms-gold);
}

body[data-sidebar="dark"] #sidebar-menu ul li a.mm-active,
body[data-sidebar="dark"] #sidebar-menu ul li a.active {
    color: var(--btms-gold-light);
}

body[data-sidebar="dark"] #sidebar-menu ul li a:hover {
    color: var(--btms-gold-light);
}

body[data-sidebar-size="sm"] .vertical-menu .navbar-brand-box {
    padding: 0 0.5rem;
    text-align: center;
}

body[data-sidebar-size="sm"] .btms-brand-logo--sidebar .logo-lg {
    display: none !important;
}

body[data-sidebar-size="sm"] .btms-brand-logo--sidebar .logo-sm {
    display: inline-block !important;
}

.btms-print-logo {
    max-height: 64px;
    width: auto;
}

.btms-developer-credit {
    font-size: 0.78rem;
    color: #74788d;
    margin: 0;
}

.btms-app-footer {
    height: auto !important;
    min-height: 48px !important;
    padding: 10px 12px !important;
    overflow: visible !important;
}

.btms-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 1.25rem;
    width: 100%;
    line-height: 1.4;
}

.btms-footer-copy {
    color: var(--bs-footer-color, #74788d);
    font-size: 0.875rem;
    white-space: nowrap;
}

.btms-footer-inner .btms-developer-credit {
    margin: 0;
    text-align: right;
    color: #74788d;
}

@media (max-width: 767.98px) {
    .btms-footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .btms-footer-inner .btms-developer-credit {
        text-align: center;
    }

    .page-content {
        padding-bottom: 96px !important;
    }
}

@media (min-width: 768px) {
    .page-content {
        padding-bottom: 72px !important;
    }
}

.btms-developer-credit strong {
    color: #495057;
    font-weight: 600;
}

.footer .btms-developer-credit strong {
    color: #343a40;
}

.btms-user-avatar,
img.header-profile-user,
.btms-profile-avatar {
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center center;
    border-radius: 50%;
    padding: 0 !important;
    background-color: #f3f4f6;
    border: 2px solid var(--btms-gold, #c9a227);
    flex-shrink: 0;
}

img.header-profile-user,
.btms-user-avatar--sm {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
}

.btms-profile-avatar,
.btms-user-avatar--lg {
    width: 120px !important;
    height: 120px !important;
    min-width: 120px;
    min-height: 120px;
    max-width: 120px;
    max-height: 120px;
    border-width: 3px;
}

.btms-avatar-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.btms-avatar-wrap--sm {
    width: 36px;
    height: 36px;
}

.btms-avatar-wrap--lg {
    width: 120px;
    height: 120px;
}

.btms-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border-radius: 50%;
    border: none;
}

#page-topbar .noti-icon .bx {
    vertical-align: middle;
}

/* Topbar notification bell */
.btms-noti-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    border: none;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.btms-noti-btn:hover,
.btms-noti-btn.show {
    background: rgba(201, 162, 39, 0.15);
}

.btms-noti-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.92);
}

.btms-noti-btn--active .btms-noti-btn__icon {
    color: var(--btms-gold, #c9a227);
}

.btms-noti-badge {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #fa6374;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border: 2px solid #061e2c;
    box-shadow: 0 0 0 1px rgba(250, 99, 116, 0.35);
    animation: btms-noti-pulse 2s ease-in-out infinite;
}

@keyframes btms-noti-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.btms-noti-dropdown {
    width: min(380px, calc(100vw - 24px));
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.btms-noti-dropdown__head {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}

.btms-noti-dropdown__body {
    max-height: 360px;
}

.btms-noti-dropdown__foot {
    padding: 10px 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #fafafa;
}

.btms-noti-section-label {
    padding: 8px 16px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #74788d;
}

.btms-noti-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background-color 0.15s ease;
}

.btms-noti-item:hover {
    background: #f8f9fa;
    color: inherit;
}

.btms-noti-item__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.btms-noti-item__content {
    min-width: 0;
    flex: 1;
}

.btms-noti-item__title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #061e2c;
    margin-bottom: 2px;
}

.btms-noti-item__message {
    display: block;
    font-size: 12px;
    color: #74788d;
    line-height: 1.4;
    margin-bottom: 4px;
}

.btms-noti-item__time {
    display: block;
    font-size: 11px;
    color: #adb5bd;
}

.btms-noti-empty {
    text-align: center;
    padding: 32px 20px;
}

.btms-noti-empty__icon {
    display: inline-flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(51, 161, 134, 0.12);
    color: #33a186;
    font-size: 28px;
    margin-bottom: 10px;
}

#page-topbar .noti-dot {
    display: none;
}

.btms-auth-footer .btms-developer-credit {
    font-size: 0.75rem;
    color: #6b7280 !important;
}

.btms-auth-footer .btms-developer-credit strong {
    color: #374151;
}

/* Authenticator (TOTP) setup */
.btms-totp-setup {
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.06) 0%, #fff 55%);
}

.btms-totp-tabs .nav-link {
    font-size: 0.875rem;
    color: #6b7280;
    border-radius: 999px;
}

.btms-totp-tabs .nav-link.active {
    background: var(--btms-gold, #c9a227);
    color: #0a0a0a;
}

.btms-totp-qr {
    border-radius: 12px;
    border: 1px solid rgba(201, 162, 39, 0.35);
    background: #fff;
    padding: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.btms-totp-qr-wrap {
    position: relative;
    min-height: 200px;
    min-width: 200px;
}

.btms-totp-qr-wrap .btms-totp-qr-host:empty {
    display: none;
}

.btms-totp-qr-wrap .btms-totp-qr-host:not(:empty) + .btms-totp-qr {
    display: none !important;
}

.btms-totp-qr-host {
    display: inline-block;
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(201, 162, 39, 0.35);
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.btms-totp-qr-host img {
    display: block;
}

.btms-totp-secret-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.btms-totp-secret {
    display: inline-block;
    padding: 0.45rem 0.65rem;
    background: #fff;
    border: 1px dashed rgba(201, 162, 39, 0.5);
    border-radius: 0.5rem;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    word-break: break-all;
}

.btms-totp-code-input {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.35em;
    padding: 0.65rem 0.75rem;
    border: 2px solid rgba(201, 162, 39, 0.35);
    border-radius: 10px;
    background: #faf9f6;
    color: #1a1408;
}

.btms-totp-code-input:focus {
    border-color: var(--btms-gold, #c9a227);
    box-shadow: 0 0 0 0.2rem rgba(201, 162, 39, 0.2);
    background: #fff;
}

.btms-totp-confirm {
    background: rgba(201, 162, 39, 0.04);
    border-radius: 0 0 12px 12px;
    margin: 0 -1rem -1rem;
    padding: 1rem 1rem 0.25rem !important;
}
