.btn-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: #f3f4f6;
    color: #111827;
    position: relative;
}

.g-1 { margin: -0.125rem; }
.g-1 > * { padding: 0.125rem; }
.g-2 { margin: -0.25rem; }
.g-2 > * { padding: 0.25rem; }
.g-3 { margin: -0.5rem; }
.g-3 > * { padding: 0.5rem; }
.g-4 { margin: -0.75rem; }
.g-4 > * { padding: 0.75rem; }
.g-5 { margin: -1rem; }
.g-5 > * { padding: 1rem; }

.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-3 { margin-left: 1rem !important; }
.fw-bold { font-weight: 700 !important; }
.fs-1 { font-size: 2.5rem !important; }
.fs-2 { font-size: 2rem !important; }
.fs-3 { font-size: 1.75rem !important; }
.fs-4 { font-size: 1.5rem !important; }
.align-middle { vertical-align: middle !important; }

.btn-close::before {
    content: "x";
    font-weight: 800;
    font-size: 18px;
    line-height: 1;
}

.btn-close:hover {
    background: #e5e7eb;
}

.app-topbar {
    margin: 0 auto 22px;
    padding: 14px 18px;
    border: 1px solid #edf0f3;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.app-topbar-title {
    min-width: 0;
}

.app-topbar-title strong {
    display: block;
    color: #0f172a;
    font-size: 16px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-topbar-title span {
    display: block;
    color: #6b7280;
    font-size: 12px;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-topbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #dbe2ea;
    background: #ffffff;
    border-radius: 14px;
    padding: 5px;
}

.language-link {
    min-width: 42px;
    padding: 7px 10px;
    border-radius: 10px;
    color: #475569;
    text-align: center;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
}

.language-link:hover,
.language-link.active {
    background: #0f172a;
    color: #ffffff;
    text-decoration: none;
}

.topbar-web-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #0f172a;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.topbar-web-link:hover {
    background: #fff7e2;
    border-color: #ead9ab;
    color: #8a6a17;
    text-decoration: none;
}

.modal {
    background: transparent;
}

.offcanvas {
    position: fixed;
    bottom: 0;
    z-index: 1045;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    visibility: hidden;
    background-clip: padding-box;
    outline: 0;
}

.modal.show {
    display: block;
}

.modal-backdrop,
.offcanvas-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(15, 23, 42, 0.45);
}

.modal-backdrop {
    z-index: 1050;
}

.modal.show .modal-dialog {
    transform: none;
}

.offcanvas.show {
    visibility: visible;
    transform: none;
}

.offcanvas-start {
    top: 0;
    left: 0;
    transform: translateX(-100%);
    transition: transform 0.24s ease;
}

.modal-open,
.offcanvas-open {
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .app-topbar {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .btn,
    .form-control,
    .form-select {
        font-size: 14px;
    }
}
