/* -------------------------------------------------------------------------------------------------
 * Biblio / profil: specifičan stil. Zajednički dizajn ostaje u css/style.css.
 * ------------------------------------------------------------------------------------------------- */
.biblio-profile
{
    --profile-panel: #211d1b;
    --profile-line: #40352b;
    --profile-gold: #e6b36f;
    --profile-dim: #c6b9ab;
    color: #f3e7d8;
    padding-bottom: 44px;
}

.biblio-profile .profile-icon
{
    width: 20px;
    height: 20px;
    flex: none;
    vertical-align: middle;
}

.profile-cover
{
    height: 185px;
    background: linear-gradient(90deg,rgba(12,10,9,.92),rgba(14,12,10,.24)),linear-gradient(0deg,#11100f,transparent 30%),url('../images/design/hero-biblioteka.webp') center 47%/cover;
    border-bottom: 1px solid #3e2e22;
}

.profile-cover-inner
{
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 20px;
}

.profile-cover-inner>span
{
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .24em;
    color: #e4bd82;
}

.profile-shell
{
    display: grid;
    grid-template-columns: 214px minmax(0,1fr);
    gap: 28px;
    position: relative;
    margin-top: -50px;
}

.profile-sidebar
{
    padding-top: 143px;
}

.profile-side-nav
{
    position: sticky;
    top: 18px;
    border: 1px solid var(--profile-line);
    border-radius: 14px;
    background: #1a1715;
    overflow: hidden;
    padding: 8px;
}

.profile-side-nav a
{
    display: flex;
    gap: 12px;
    align-items: center;
    color: var(--profile-dim);
    padding: 13px 12px;
    border-radius: 9px;
    text-decoration: none;
    font-size: .92rem;
}

.profile-side-nav a:hover,.profile-side-nav a[aria-current="page"]
{
    color: #f7d093;
    background: linear-gradient(95deg,#6b4925,#30251b);
}

.profile-main
{
    min-width: 0;
}

.profile-identity
{
    display: flex;
    gap: 24px;
    align-items: center;
    min-height: 169px;
    padding-bottom: 14px;
}

.profile-avatar-wrap
{
    width: 142px;
    height: 142px;
    flex: none;
    border: 3px solid var(--profile-gold);
    border-radius: 50%;
    background: #27221e;
    padding: 4px;
    overflow: hidden;
    box-shadow: 0 6px 30px #0009;
    display: grid;
    place-items: center;
}

.profile-avatar
{
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* border-radius: 50%; */
}

.profile-avatar-link
{
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    cursor: zoom-in;
}

.profile-avatar-link:focus-visible
{
    outline: 2px solid #fff;
    outline-offset: -3px;
}

/* Uvećana profilna fotografija zadržava pune proporcije u nativnom modalnom prozoru. */
.profile-lightbox-open
{
    overflow: hidden;
}

.profile-avatar-lightbox
{
    width: fit-content;
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 32px);
    padding: 56px 16px 16px;
    border: 1px solid #655039;
    border-radius: 16px;
    background: #171412;
    color: #f3e7d8;
    box-shadow: 0 20px 80px #000a;
}

.profile-avatar-lightbox::backdrop
{
    background: #000d;
}

.profile-avatar-lightbox-controls
{
    position: absolute;
    top: 10px;
    right: 10px;
    margin: 0;
}

.profile-avatar-lightbox-close
{
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #655039;
    border-radius: 8px;
    background: #29221c;
    color: #f3e7d8;
    cursor: pointer;
}

.profile-avatar-lightbox-close:hover,.profile-avatar-lightbox-close:focus-visible
{
    background: #473422;
    outline: 2px solid #e6b36f;
    outline-offset: 2px;
}

.profile-avatar-lightbox-close .profile-icon
{
    width: 22px;
    height: 22px;
}

.profile-avatar-full
{
    display: block;
    width: auto;
    height: auto;
    max-width: min(1200px, calc(100vw - 66px));
    max-height: calc(100dvh - 120px);
    object-fit: contain;
}

.profile-avatar-fallback
{
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: #393029;
    border-radius: 50%;
}

.profile-avatar-fallback .profile-icon
{
    height: 72px;
    width: 72px;
    color: #dfb47c;
}

.profile-identity-content
{
    min-width: 0;
}

.profile-kicker
{
    color: var(--profile-gold);
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    margin: 0 0 5px;
}

.profile-identity h1
{
    font: 700 clamp(28px,3vw,40px)/1.15 Georgia,serif;
    color: #f8eee3;
    margin: 0 0 7px;
}

.profile-status
{
    margin: 0 0 7px;
    color: #e2cdb3;
}

.profile-meta
{
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--profile-dim);
    font-size: .84rem;
}

.profile-meta span
{
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.profile-meta .profile-icon
{
    height: 16px;
    width: 16px;
    color: var(--profile-gold);
}

.profile-bio
{
    margin: 8px 0 0;
    font-size: .83rem;
    color: #c6bcb0;
}

.profile-stat-grid
{
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    gap: 12px;
    margin: 12px 0 24px;
}

.profile-stat
{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid var(--profile-line);
    border-radius: 13px;
    background: linear-gradient(145deg,#231e1b,#191615);
    padding: 15px 9px;
}

.profile-stat>.profile-icon
{
    width: 27px;
    height: 27px;
    color: var(--profile-gold);
}

.profile-stat strong
{
    font: 700 27px Georgia,serif;
    color: #fff;
    display: block;
    line-height: 1;
}

.profile-stat span
{
    display: block;
    color: #c6b9ac;
    font-size: .76rem;
    margin-top: 7px;
}

.profile-top-tabs
{
    display: flex;
    gap: 4px;
    align-items: center;
    overflow-x: auto;
    border-bottom: 1px solid var(--profile-line);
    margin-bottom: 20px;
    scrollbar-width: thin;
}

.profile-top-tabs a
{
    display: inline-flex;
    gap: 7px;
    align-items: center;
    flex: none;
    padding: 11px 14px;
    color: var(--profile-dim);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    font-size: .9rem;
    white-space: nowrap;
}

.profile-top-tabs a:hover,.profile-top-tabs a[aria-current="page"]
{
    background: #302418;
    color: #f1c17e;
    border-bottom-color: #e6b36f;
    border-radius: 8px 8px 0 0;
}

.profile-top-tabs .profile-icon
{
    width: 17px;
    height: 17px;
}

.profile-dashboard-grid
{
    display: grid;
    grid-template-columns: 1.12fr 1fr;
    gap: 18px;
}

.profile-panel
{
    min-width: 0;
    border: 1px solid var(--profile-line);
    border-radius: 14px;
    background: linear-gradient(155deg,#27211e,#191716);
    padding: 22px;
}

.profile-panel h2
{
    margin: 0 0 18px;
    display: flex;
    gap: 12px;
    align-items: center;
    font: 700 21px Georgia,serif;
    color: #f8e8d2;
}

.profile-panel h2>.profile-icon
{
    color: #eab66e;
    width: 23px;
    height: 23px;
}

.profile-panel-header
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.profile-panel-header>a
{
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: #e9bc7d;
    font-size: .81rem;
    text-decoration: none;
    white-space: nowrap;
}

.profile-panel-header>a:hover
{
    text-decoration: underline;
}

.profile-panel-header>a .profile-icon
{
    width: 16px;
    height: 16px;
}

.profile-reading-item
{
    display: flex;
    gap: 18px;
    align-items: center;
    margin: 12px 0;
}

.profile-cover-link
{
    flex: none;
    display: block;
    width: 92px;
}

.profile-cover-link img
{
    display: block;
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 7px;
    border: 1px solid #63503c;
}

.profile-reading-item h3
{
    margin: 0 0 3px;
    font: 700 22px Georgia,serif;
}

.profile-reading-item h3 a,.profile-library-book h3 a
{
    color: inherit;
    text-decoration: none;
}

.profile-reading-item h3 a:hover,.profile-library-book h3 a:hover
{
    color: #f0c17d;
}

.profile-reading-item p
{
    margin: 0 0 10px;
    color: var(--profile-dim);
}

.profile-status-chip
{
    color: #eec387;
    background: #3f2f1d;
    border: 1px solid #775735;
    border-radius: 30px;
    padding: 3px 9px;
    font-size: .75rem;
    display: inline-block;
}

.profile-inline-form
{
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.profile-inline-form select,.profile-book-form select
{
    padding: 8px 9px;
    color: #f6e7d7;
    border: 1px solid #6a5139;
    border-radius: 7px;
    background: #25201c;
    min-width: 0;
}

.profile-small-button,.profile-book-form button
{
    padding: 8px 10px;
    background: #53391f;
    border: 1px solid #977047;
    color: #f8dfb9;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.profile-small-button:hover,.profile-book-form button:hover
{
    background: #74502a;
}

.profile-small-button .profile-icon
{
    width: 16px;
    height: 16px;
}

.profile-facts
{
    margin: 0;
}

.profile-facts>div
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #3a302a;
    padding: 13px 0;
}

.profile-facts dt
{
    color: #d3c4b3;
    font-size: .87rem;
}

.profile-facts dd
{
    color: #fff;
    font-weight: 700;
    margin: 0;
}

.profile-mini-books
{
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 15px;
}

.profile-mini-book
{
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 5px;
    text-decoration: none;
}

.profile-mini-book img
{
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 7px;
    border: 1px solid #4f4135;
    background: #2c2420;
}

.profile-mini-book strong
{
    color: #f4e5d1;
    font-size: .78rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.profile-mini-book span
{
    display: flex;
    align-items: center;
    gap: 4px;
    color: #e8b367;
    font-size: .76rem;
}

.profile-mini-book span .profile-icon
{
    width: 14px;
    height: 14px;
    fill: #e8b367;
}

.profile-empty
{
    color: #cfbca8;
    font-size: .92rem;
    margin: 4px 0;
}

.profile-empty a
{
    color: #f3c485;
}

.profile-alert
{
    background: #253b2b;
    border: 1px solid #4e7456;
    padding: 12px 14px;
    border-radius: 8px;
    margin: 0 0 18px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.profile-error
{
    background: #442725;
    border-color: #8a4d4b;
}

.biblio-profile [hidden]
{
    display: none!important;
}

.profile-library-panel
{
    min-height: 300px;
}

.profile-count
{
    font: 600 13px system-ui,sans-serif;
    color: #e4ba7e;
    background: #3b2b1c;
    padding: 3px 9px;
    border-radius: 100px;
}

.profile-filter-label
{
    display: flex;
    gap: 8px;
    align-items: center;
    max-width: 360px;
    border: 1px solid #64513c;
    border-radius: 9px;
    background: #191715;
    padding: 9px 12px;
    margin: 6px 0 20px;
    color: #e0ad6d;
}

.profile-filter-label .profile-icon
{
    width: 17px;
    height: 17px;
}

.profile-filter-label input
{
    width: 100%;
    min-width: 0;
    background: none;
    border: 0;
    color: #f4e9dc;
    outline: 0;
}

.profile-library-grid
{
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(165px,1fr));
    gap: 17px;
}

.profile-library-book
{
    border: 1px solid #41372d;
    background: #211d1a;
    border-radius: 10px;
    padding: 12px;
    min-width: 0;
}

.profile-library-book>a
{
    display: block;
}

.profile-library-book img
{
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 6px;
    background: #32291e;
}

.profile-library-book h3
{
    font: 700 17px/1.25 Georgia,serif;
    margin: 10px 0 4px;
}

.profile-library-book p
{
    font-size: .79rem;
    color: var(--profile-dim);
    margin: 0 0 10px;
}

.profile-book-rating
{
    color: #eab569;
    font-size: .85rem;
    display: flex;
    gap: 4px;
    align-items: center;
}

.profile-book-rating .profile-icon
{
    width: 16px;
    height: 16px;
    fill: #dca85f;
}

.profile-book-form
{
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.profile-book-form select
{
    flex: 1 1 100px;
}

.profile-book-form button
{
    flex: 1 1 auto;
}

.profile-book-form .profile-remove
{
    background: transparent;
    border-color: #71554c;
    color: #e4b5a8;
}

.profile-book-form .profile-remove:hover
{
    background: #57302a;
}

.profile-lists-grid
{
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(230px,1fr));
    gap: 15px;
}

.profile-list-card
{
    padding: 18px;
    background: #1b1816;
    border: 1px solid #4d3c2d;
    border-radius: 10px;
}

.profile-list-title
{
    display: flex;
    gap: 8px;
    align-items: center;
}

.profile-list-title .profile-icon
{
    color: #e9b46f;
}

.profile-list-title h3
{
    margin: 0;
    font: 700 19px Georgia,serif;
}

.profile-list-card p
{
    color: #c6b7a5;
    font-size: .85rem;
}

.profile-timeline
{
    padding: 0;
    list-style: none;
}

.profile-timeline li
{
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #3e342b;
}

.profile-timeline-icon
{
    color: #e5b16c;
}

.profile-timeline p
{
    margin: 4px 0;
    color: #cabdb0;
}

.profile-timeline small
{
    color: #a99b8d;
}

@media(max-width:1100px)
{
    .profile-shell
    {
        grid-template-columns: 170px minmax(0,1fr);
        gap: 18px;
    }

    .profile-stat-grid
    {
        gap: 7px;
    }

    .profile-stat
    {
        gap: 6px;
    }

    .profile-dashboard-grid
    {
        grid-template-columns: 1fr 1fr;
    }

    .profile-panel
    {
        padding: 17px;
    }

    .profile-mini-books
    {
        gap: 8px;
    }
}

@media(max-width:840px)
{
    .profile-shell
    {
        display: block;
        margin-top: -65px;
    }

    .profile-sidebar
    {
        display: none;
    }

    .profile-identity
    {
        min-height: 170px;
    }

    .profile-dashboard-grid
    {
        grid-template-columns: 1fr 1fr;
    }

    .profile-stat-grid
    {
        grid-template-columns: repeat(3,1fr);
    }

    .profile-top-tabs
    {
        margin-top: 15px;
    }
}

@media(max-width:630px)
{
    .profile-cover
    {
        height: 135px;
    }

    .profile-cover-inner>span
    {
        display: none;
    }

    .profile-shell
    {
        margin-top: -47px;
    }

    .profile-identity
    {
        align-items: flex-start;
        gap: 14px;
        min-height: 135px;
    }

    .profile-avatar-wrap
    {
        width: 91px;
        height: 91px;
    }

    .profile-avatar-fallback .profile-icon
    {
        width: 45px;
        height: 45px;
    }

    .profile-identity h1
    {
        font-size: 25px;
    }

    .profile-meta
    {
        gap: 5px;
    }

    .profile-bio
    {
        display: none;
    }

    .profile-stat-grid
    {
        grid-template-columns: repeat(3,1fr);
    }

    .profile-stat
    {
        padding: 12px 5px;
        gap: 7px;
    }

    .profile-stat>.profile-icon
    {
        width: 19px;
        height: 19px;
    }

    .profile-stat strong
    {
        font-size: 22px;
    }

    .profile-stat span
    {
        font-size: .68rem;
    }

    .profile-dashboard-grid
    {
        grid-template-columns: 1fr;
    }

    .profile-panel
    {
        padding: 16px;
    }

    .profile-panel h2
    {
        font-size: 18px;
    }

    .profile-mini-books
    {
        gap: 10px;
    }

    .profile-library-grid
    {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .profile-top-tabs a
    {
        padding: 11px 12px;
    }

    .profile-reading-item
    {
        gap: 12px;
    }

    .profile-cover-link
    {
        width: 78px;
    }
}

@media(max-width:370px)
{
    .profile-stat-grid
    {
        grid-template-columns: repeat(2,1fr);
    }

    .profile-library-grid
    {
        grid-template-columns: 1fr 1fr;
    }

    .profile-identity h1
    {
        font-size: 21px;
    }

    .profile-panel-header
    {
        align-items: flex-start;
        flex-wrap: wrap;
    }
}

/* Korak 4: fizička biblioteka, evidencija čitanja, praćenje korisnika. */
.profile-stat-grid
{
    grid-template-columns: repeat(6,minmax(0,1fr));
}

a.profile-stat
{
    text-decoration: none;
    color: inherit;
}

a.profile-stat:hover
{
    border-color: #c99a58;
    background: #32251b;
}

.profile-section-description
{
    color: #cbb9a5;
    font-size: .93rem;
    line-height: 1.6;
    margin: 4px 0 20px;
}

.profile-follow-form
{
    margin-top: 13px;
}

.profile-follow-form button
{
    padding: 11px 18px;
}

.profile-page-fields
{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-page-fields label
{
    flex: 1;
    min-width: 100px;
}

.profile-progress-form label
{
    font-size: .8rem;
    color: #d9c4a7;
}

.profile-progress-form input,.profile-progress-form select
{
    background: #191614;
    border: 1px solid #75583c;
    color: #fff2e0;
    border-radius: 7px;
    padding: 8px;
    max-width: 100%;
    width: 100%;
    margin-top: 4px;
}

.profile-progress-form
{
    display: grid;
    grid-template-columns: 1fr 1.3fr auto;
    align-items: end;
    gap: 10px;
    margin-top: 12px;
}

.profile-progress-form>[hidden]
{
    display: none!important;
}

.profile-progress-form>button
{
    align-self: end;
}

.profile-reading-item
{
    margin-bottom: 22px;
}

.profile-reading-info
{
    min-width: 0;
}

.profile-pages-note
{
    color: #d4b484;
    font-size: .8rem;
}

.profile-user-grid
{
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(250px,1fr));
    gap: 12px;
    margin-top: 20px;
}

.profile-user-card
{
    display: flex;
    gap: 13px;
    align-items: center;
    border: 1px solid #4c3c2e;
    background: #201b18;
    border-radius: 10px;
    padding: 14px;
    color: #f5e3ca;
    text-decoration: none;
    min-width: 0;
}

.profile-user-card:hover
{
    border-color: #d4a460;
    background: #30241c;
}

.profile-user-card strong
{
    display: block;
}

.profile-user-card small
{
    color: #bda992;
    display: block;
    margin-top: 3px;
}

.profile-user-avatar
{
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid #d4a460;
    border-radius: 50%;
    color: #d4a460;
    flex: none;
}

.profile-user-avatar .profile-icon
{
    width: 26px;
    height: 26px;
}

.profile-user-card>.profile-icon
{
    margin-left: auto;
    color: #d4a460;
}

.profile-directory
{
    padding-top: 55px;
}

.profile-directory h1
{
    font: 700 33px Georgia,serif;
    color: #f4d09c;
    margin: 0 0 12px;
}

.profile-directory-search
{
    display: flex;
    gap: 10px;
    max-width: 560px;
}

.profile-directory-search input
{
    flex: 1;
    min-width: 0;
    padding: 12px;
    background: #151311;
    border: 1px solid #675038;
    color: #f6e7d4;
    border-radius: 9px;
}

@media(max-width:1100px)
{
    .profile-stat-grid
    {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
}

@media(max-width:700px)
{
    .profile-progress-form
    {
        grid-template-columns: 1fr;
    }

    .profile-stat-grid
    {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .profile-directory-search
    {
        flex-wrap: wrap;
    }
}

.book-actions-step4
{
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2,minmax(0,1fr));
    margin-top: 24px;
}

.book-actions-step4 form
{
    background: #211c18;
    border: 1px solid #54402d;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.book-actions-step4 label
{
    width: 100%;
    color: #e4caa9;
}

.book-actions-step4 select,.book-actions-step4 textarea
{
    display: block;
    width: 100%;
    background: #161310;
    border: 1px solid #765b3c;
    border-radius: 8px;
    color: #f6e3cd;
    padding: 10px;
    margin-top: 5px;
}

.book-actions-step4 textarea
{
    min-height: 90px;
}

.book-actions-step4 a
{
    color: #f1bd78;
}

.book-reviews-step4
{
    margin-top: 28px;
}

.book-review-step4
{
    padding: 15px 0;
    border-top: 1px solid #42382e;
}

.book-review-step4 a
{
    color: #f0c183;
}

.book-review-step4 span
{
    color: #e8b467;
    margin-left: 12px;
}

.book-review-step4 p
{
    color: #e2d1bc;
}

.book-review-step4 small
{
    color: #a99986;
}

@media(max-width:700px)
{
    .book-actions-step4
    {
        grid-template-columns: 1fr;
    }
}

/* Korak 6: postavke privatnosti */
.biblio-settings-form
{
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.biblio-settings-option
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem;
    border: 1px solid rgba(215,175,109,.18);
    border-radius: 14px;
    background: rgba(255,255,255,.025);
}

.biblio-settings-option span
{
    display: grid;
    gap: .5rem;
}

.biblio-settings-option strong
{
    font-size: 1.05rem;
}

.biblio-settings-option small
{
    display: block;
    color: #aea79d;
    line-height: 1.6;
}

.biblio-settings-option input
{
    width: 22px;
    height: 22px;
    accent-color: #cf9f53;
    flex-shrink: 0;
}

.biblio-settings-actions
{
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.biblio-settings-actions a
{
    color: #d7b174;
}

/* Veza sa uređivanjem korisničkih lista. */
.bl-profil-dugme
{
    display: inline-block;
    background: #d5a45f;
    color: #23170a!important;
    border-radius: 8px;
    padding: 10px 16px;
    text-decoration: none;
    font-weight: 700;
}
