/* AndroStickers admin - Bootstrap 5.3 shell */

:root {
    --brand: #50aab2;
    --brand-dark: #3c7d83;
    --sidebar-width: 250px;
}

body {
    min-height: 100vh;
    background-color: var(--bs-body-bg);
}

/* ---------- Sidebar ---------- */
.admin-sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1030;
    background-color: var(--bs-body-bg);
    border-right: 1px solid var(--bs-border-color);
    transition: margin-left .25s ease;
}

.admin-sidebar .sidebar-brand {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--bs-border-color);
}

.admin-sidebar .sidebar-brand img {
    max-height: 40px;
    max-width: 160px;
    object-fit: contain;
}

.admin-sidebar .nav-link {
    color: var(--bs-body-color);
    border-radius: .5rem;
    margin: .125rem .75rem;
    padding: .55rem .85rem;
    display: flex;
    align-items: center;
    gap: .65rem;
    font-weight: 500;
}

.admin-sidebar .nav-link .bi {
    font-size: 1.1rem;
}

.admin-sidebar .nav-link:hover {
    background-color: var(--bs-tertiary-bg);
}

.admin-sidebar .nav-link.active {
    background-color: var(--brand);
    color: #fff;
}

/* ---------- Topbar + content ---------- */
.admin-main {
    margin-left: var(--sidebar-width);
    transition: margin-left .25s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topbar {
    height: 64px;
    border-bottom: 1px solid var(--bs-border-color);
    background-color: var(--bs-body-bg);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.admin-content {
    padding: 1.5rem;
    flex: 1 1 auto;
}

.admin-footer {
    border-top: 1px solid var(--bs-border-color);
    padding: .85rem 1.5rem;
    font-size: .875rem;
    color: var(--bs-secondary-color);
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }

    .admin-sidebar.show {
        margin-left: 0;
        box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35);
    }

    .admin-main {
        margin-left: 0;
    }
}

/* ---------- Cards / stats ---------- */
.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    background-color: var(--brand);
}

.stat-card .stat-value {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1;
}

.card-category-img {
    height: 160px;
    object-fit: contain;
}

/* ---------- Sticker thumbnails ---------- */
.img-stickers {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: .75rem 0;
}

.wrapper-thumb {
    position: relative;
    display: inline-block;
}

.sticker-preview-thumb,
.img-preview-thumb {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    background-color: var(--bs-tertiary-bg);
    padding: 3px;
}

.img-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .75rem;
}

.remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    line-height: 16px;
    text-align: center;
    font-size: 12px;
    border-radius: 50%;
    background: var(--bs-danger);
    color: #fff;
    cursor: pointer;
    user-select: none;
}

/* ---------- Upload preview ---------- */
.fileupload_img {
    margin-top: .75rem;
}

.fileupload_img img {
    max-width: 150px;
    max-height: 120px;
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    padding: 4px;
    background-color: var(--bs-tertiary-bg);
}

/* ---------- Misc ---------- */
.show-2linetext {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ql-editor {
    min-height: 220px;
    /* Cap the height: Quill grows to fit its content, and a long privacy policy
       pushed the Submit button thousands of pixels down the page. Scroll inside
       the editor instead so the form stays usable at any length. */
    max-height: 55vh;
    overflow-y: auto;
    background-color: var(--bs-body-bg);
}

/* ---------- Login page ---------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    padding: 1rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .25);
}

.login-card .login-logo {
    max-height: 64px;
    max-width: 180px;
    object-fit: contain;
}
