/* =========================================================
   Dashboard V2 - Global custom UI
   Prvo prebačeno iz index.php
========================================================= */

:root {
    --dash-border: #d8dee9;
    --dash-border-strong: #c5cfdd;
    --dash-soft: #f3f6fb;
    --dash-soft-2: #edf2f8;
    --dash-muted: #475569;
    --dash-muted-2: #334155;
    --dash-dark: #111827;
    --dash-head: #172033;
    --dash-head-2: #202b41;
    --dash-head-border: rgba(255, 255, 255, .12);
    --dash-shadow: 0 16px 38px rgba(15, 23, 42, .10);
    --dash-shadow-sm: 0 10px 24px rgba(15, 23, 42, .07);
    --dash-radius: 18px;
}

/* =========================================================
   Shell / text
========================================================= */

.dashboard-shell {
    position: relative;
    color: var(--dash-dark);
}

.dashboard-shell .text-muted {
    color: var(--dash-muted) !important;
}

.dashboard-shell .fs-sm,
.dashboard-shell small {
    color: var(--dash-muted);
}

/* =========================================================
   Hero
========================================================= */

.dashboard-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 24px;
    background:
        radial-gradient(circle at 8% 20%, rgba(79, 70, 229, .26), transparent 34%),
        radial-gradient(circle at 85% 15%, rgba(14, 165, 233, .20), transparent 34%),
        linear-gradient(135deg, #0f172a 0%, #172033 48%, #243044 100%);
    color: #fff;
    box-shadow: var(--dash-shadow);
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -120px;
    width: 320px;
    height: 320px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
}

.dashboard-hero-content {
    position: relative;
    z-index: 2;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .42rem .72rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .13);
    color: rgba(255, 255, 255, .94);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.hero-title {
    font-size: clamp(1.65rem, 2.3vw, 2.45rem);
    line-height: 1.12;
    letter-spacing: -.03em;
}

.hero-subtitle {
    max-width: 720px;
    color: rgba(255, 255, 255, .80);
}

.hero-mini-card {
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 18px;
    background: rgba(255, 255, 255, .09);
    backdrop-filter: blur(10px);
}

/* =========================================================
   Hero buttons
========================================================= */

.dashboard-hero .btn-hero-light,
.dashboard-hero .btn-hero-light:visited {
    background: #ffffff !important;
    border-color: #ffffff !important;
    color: #111827 !important;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
}

.dashboard-hero .btn-hero-light i {
    color: #0665d0 !important;
}

.dashboard-hero .btn-hero-light:hover,
.dashboard-hero .btn-hero-light:focus,
.dashboard-hero .btn-hero-light:active,
.dashboard-hero .btn-hero-light:focus-visible {
    background: #eef2f7 !important;
    border-color: #eef2f7 !important;
    color: #111827 !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .24);
}

.dashboard-hero .btn-hero-light:hover i,
.dashboard-hero .btn-hero-light:focus i,
.dashboard-hero .btn-hero-light:active i {
    color: #0665d0 !important;
}

.dashboard-hero .btn-hero-outline,
.dashboard-hero .btn-hero-outline:visited {
    background: rgba(255, 255, 255, .14) !important;
    border-color: rgba(255, 255, 255, .38) !important;
    color: #ffffff !important;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .14);
}

.dashboard-hero .btn-hero-outline i {
    color: #ffffff !important;
}

.dashboard-hero .btn-hero-outline:hover,
.dashboard-hero .btn-hero-outline:focus,
.dashboard-hero .btn-hero-outline:active,
.dashboard-hero .btn-hero-outline:focus-visible {
    background: rgba(255, 255, 255, .24) !important;
    border-color: rgba(255, 255, 255, .52) !important;
    color: #ffffff !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .22);
}

.dashboard-hero .btn-hero-outline:hover i,
.dashboard-hero .btn-hero-outline:focus i,
.dashboard-hero .btn-hero-outline:active i {
    color: #ffffff !important;
}

/* =========================================================
   Cards / blocks
========================================================= */

.dash-card {
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-radius);
    background: #ffffff;
    box-shadow: var(--dash-shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    overflow: hidden;
}

.dash-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--dash-shadow);
    border-color: var(--dash-border-strong);
}

.dash-card-static:hover {
    transform: none;
}

.dash-card .block-header,
.dash-card .block-header-default {
    border-bottom: 1px solid var(--dash-head-border) !important;
    border-radius: var(--dash-radius) var(--dash-radius) 0 0;
    background:
        radial-gradient(circle at 0% 0%, rgba(6, 101, 208, .24), transparent 32%),
        linear-gradient(135deg, var(--dash-head) 0%, var(--dash-head-2) 100%) !important;
    color: #ffffff;
    min-height: 74px;
}

.dash-card .block-header .block-title,
.dash-card .block-header h1,
.dash-card .block-header h2,
.dash-card .block-header h3,
.dash-card .block-header h4,
.dash-card .block-header h5,
.dash-card .block-header h6 {
    color: #ffffff !important;
}

.dash-card .block-header .text-muted,
.dash-card .block-header .fs-sm {
    color: rgba(255, 255, 255, .76) !important;
}

.dash-card .block-header i.text-primary,
.dash-card .block-header i.text-info,
.dash-card .block-header i.text-warning,
.dash-card .block-header i.text-success,
.dash-card .block-header i.text-danger {
    color: #8ec5ff !important;
}

.dash-card .block-header .btn-alt-primary,
.dash-card .block-header .btn-alt-secondary {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .18);
    color: #ffffff;
}

.dash-card .block-header .btn-alt-primary:hover,
.dash-card .block-header .btn-alt-secondary:hover {
    background: rgba(255, 255, 255, .20);
    border-color: rgba(255, 255, 255, .28);
    color: #ffffff;
}

/* =========================================================
   Metrics
========================================================= */

.metric-card {
    min-height: 162px;
}

.metric-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.metric-label {
    color: var(--dash-muted-2);
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .035em;
}

.metric-value {
    color: var(--dash-dark);
    font-size: 2.1rem;
    line-height: 1;
    letter-spacing: -.04em;
}

.metric-footer {
    color: var(--dash-muted);
    font-size: .86rem;
    font-weight: 600;
}

/* =========================================================
   Soft colors / progress
========================================================= */

.soft-progress {
    height: 7px;
    border-radius: 999px;
    background: #e8edf5;
    overflow: hidden;
}

.soft-progress>span {
    display: block;
    height: 100%;
    border-radius: 999px;
}

.bg-soft-primary {
    background: rgba(6, 101, 208, .12);
}

.bg-soft-success {
    background: rgba(25, 135, 84, .13);
}

.bg-soft-info {
    background: rgba(13, 202, 240, .14);
}

.bg-soft-warning {
    background: rgba(255, 193, 7, .18);
}

.bg-soft-danger {
    background: rgba(220, 53, 69, .13);
}

/* =========================================================
   Quick actions
========================================================= */

.quick-action {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1rem;
    border: 1px solid var(--dash-border);
    border-radius: 16px;
    background: #ffffff;
    color: var(--dash-dark);
    transition: all .18s ease;
}

.quick-action:hover {
    border-color: var(--dash-border-strong);
    background: #f8fbff;
    color: var(--dash-dark);
    transform: translateY(-1px);
}

.quick-action .fw-bold {
    color: var(--dash-dark);
}

.quick-action-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* =========================================================
   Status / charts
========================================================= */

.status-panel {
    border: 1px solid var(--dash-border);
    border-radius: 16px;
    background: var(--dash-soft);
}

.status-panel .fw-bold,
.status-panel .fs-5 {
    color: var(--dash-dark);
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    display: inline-block;
}

.chart-box {
    position: relative;
    min-height: 330px;
}

.mini-chart-box {
    position: relative;
    min-height: 270px;
}

/* =========================================================
   Product image
========================================================= */

.product-img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 14px;
    background: #edf2f7;
    border: 1px solid var(--dash-border);
}

.product-img-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--dash-soft-2);
    border: 1px solid var(--dash-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================================
   Tables
========================================================= */

.table-dashboard {
    color: var(--dash-dark);
}

.table-dashboard> :not(caption)>*>* {
    padding: 1rem 1rem;
    border-color: #e6ebf2;
}

.table-dashboard thead th {
    color: #ffffff;
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    background:
        radial-gradient(circle at 0% 0%, rgba(6, 101, 208, .28), transparent 34%),
        linear-gradient(135deg, var(--dash-head) 0%, var(--dash-head-2) 100%);
    border-bottom: 0;
    white-space: nowrap;
}

.table-dashboard tbody td {
    color: var(--dash-dark);
    background: #ffffff;
}

.table-dashboard tbody tr:hover td {
    background: #f6f9fd;
}

.table-dashboard tbody tr:last-child td {
    border-bottom: 0;
}

/* =========================================================
   Empty / pills / badges
========================================================= */

.empty-box {
    border: 1px dashed var(--dash-border-strong);
    border-radius: 18px;
    background: #f8fbff;
}

.empty-box .fw-bold {
    color: var(--dash-dark);
}

.activity-pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .7rem;
    border-radius: 999px;
    background: #f2f6fb;
    border: 1px solid var(--dash-border);
    color: var(--dash-muted-2);
    font-size: .82rem;
    font-weight: 800;
}

.badge {
    font-weight: 800;
}

/* =========================================================
   Responsive
========================================================= */

@media (max-width: 767.98px) {
    .dashboard-hero {
        border-radius: 18px;
    }

    .metric-card {
        min-height: auto;
    }

    .chart-box,
    .mini-chart-box {
        min-height: 285px;
    }

    .table-dashboard> :not(caption)>*>* {
        padding: .85rem .75rem;
    }
}

/* =========================================================
   OLX profil page
   Prebačeno iz olx_profil.php
========================================================= */

:root {
    --profile-border: var(--dash-border, #d8dee9);
    --profile-border-strong: var(--dash-border-strong, #c5cfdd);
    --profile-soft: var(--dash-soft, #f3f6fb);
    --profile-soft-2: var(--dash-soft-2, #edf2f8);
    --profile-muted: var(--dash-muted, #475569);
    --profile-muted-2: var(--dash-muted-2, #334155);
    --profile-dark: var(--dash-dark, #111827);
    --profile-head: var(--dash-head, #172033);
    --profile-head-2: var(--dash-head-2, #202b41);
    --profile-head-border: var(--dash-head-border, rgba(255, 255, 255, .12));
    --profile-shadow: var(--dash-shadow, 0 16px 38px rgba(15, 23, 42, .10));
    --profile-shadow-sm: var(--dash-shadow-sm, 0 10px 24px rgba(15, 23, 42, .07));
    --profile-radius: var(--dash-radius, 18px);
}

.olx-shell {
    position: relative;
    color: var(--profile-dark);
}

.olx-shell .text-muted {
    color: var(--profile-muted) !important;
}

.olx-shell .fs-sm,
.olx-shell small {
    color: var(--profile-muted);
}

.olx-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 24px;
    background:
        radial-gradient(circle at 8% 20%, rgba(255, 193, 7, .22), transparent 32%),
        radial-gradient(circle at 88% 12%, rgba(6, 101, 208, .24), transparent 34%),
        linear-gradient(135deg, #0f172a 0%, #172033 48%, #243044 100%);
    color: #fff;
    box-shadow: var(--profile-shadow);
}

.olx-hero::after {
    content: "";
    position: absolute;
    right: -110px;
    top: -120px;
    width: 330px;
    height: 330px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
}

.olx-hero-content {
    position: relative;
    z-index: 2;
}

/* Hero dugmad na olx_profil.php */
.olx-hero .btn-hero-light,
.olx-hero .btn-hero-light:visited {
    background: #ffffff !important;
    border-color: #ffffff !important;
    color: #111827 !important;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
}

.olx-hero .btn-hero-light i {
    color: #0665d0 !important;
}

.olx-hero .btn-hero-light:hover,
.olx-hero .btn-hero-light:focus,
.olx-hero .btn-hero-light:active,
.olx-hero .btn-hero-light:focus-visible {
    background: #eef2f7 !important;
    border-color: #eef2f7 !important;
    color: #111827 !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .24);
}

.olx-hero .btn-hero-light:hover i,
.olx-hero .btn-hero-light:focus i,
.olx-hero .btn-hero-light:active i {
    color: #0665d0 !important;
}

.olx-hero .btn-hero-outline,
.olx-hero .btn-hero-outline:visited {
    background: rgba(255, 255, 255, .14) !important;
    border-color: rgba(255, 255, 255, .38) !important;
    color: #ffffff !important;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .14);
}

.olx-hero .btn-hero-outline i {
    color: #ffffff !important;
}

.olx-hero .btn-hero-outline:hover,
.olx-hero .btn-hero-outline:focus,
.olx-hero .btn-hero-outline:active,
.olx-hero .btn-hero-outline:focus-visible {
    background: rgba(255, 255, 255, .24) !important;
    border-color: rgba(255, 255, 255, .52) !important;
    color: #ffffff !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .22);
}

.olx-hero .btn-hero-outline:hover i,
.olx-hero .btn-hero-outline:focus i,
.olx-hero .btn-hero-outline:active i {
    color: #ffffff !important;
}

/* Kartice */
.profile-card {
    border: 1px solid var(--profile-border);
    border-radius: var(--profile-radius);
    background: #fff;
    box-shadow: var(--profile-shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    overflow: hidden;
}

.profile-card:hover {
    transform: translateY(-2px);
    border-color: var(--profile-border-strong);
    box-shadow: var(--profile-shadow);
}

.profile-card-static:hover {
    transform: none;
}

.profile-card .block-header,
.profile-card .block-header-default {
    border-bottom: 1px solid var(--profile-head-border) !important;
    border-radius: var(--profile-radius) var(--profile-radius) 0 0;
    background:
        radial-gradient(circle at 0% 0%, rgba(6, 101, 208, .24), transparent 32%),
        linear-gradient(135deg, var(--profile-head) 0%, var(--profile-head-2) 100%) !important;
    color: #ffffff;
    min-height: 74px;
}

.profile-card .block-header .block-title,
.profile-card .block-header h1,
.profile-card .block-header h2,
.profile-card .block-header h3,
.profile-card .block-header h4,
.profile-card .block-header h5,
.profile-card .block-header h6 {
    color: #ffffff !important;
}

.profile-card .block-header .small-muted,
.profile-card .block-header .text-muted,
.profile-card .block-header .fs-sm {
    color: rgba(255, 255, 255, .76) !important;
}

.profile-card .block-header i.text-primary,
.profile-card .block-header i.text-info,
.profile-card .block-header i.text-warning,
.profile-card .block-header i.text-success,
.profile-card .block-header i.text-danger {
    color: #8ec5ff !important;
}

.profile-card .btn-alt-secondary,
.profile-card .btn-alt-primary {
    font-weight: 800;
}

/* Stat kartice */
.stat-card {
    min-height: 148px;
}

.stat-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.stat-label {
    color: var(--profile-muted-2);
    font-size: .8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.stat-value {
    color: var(--profile-dark);
    font-size: 2.1rem;
    line-height: 1;
    letter-spacing: -.04em;
}

/* Dodatne soft boje */
.bg-soft-secondary {
    background: rgba(100, 116, 139, .14);
}

/* OLX profil avatar */
.profile-avatar {
    width: 94px;
    height: 94px;
    border-radius: 22px;
    object-fit: cover;
    background: #edf2f7;
    border: 1px solid var(--profile-border);
    box-shadow: 0 12px 28px rgba(20, 34, 58, .08);
}

.profile-avatar-placeholder {
    width: 94px;
    height: 94px;
    border-radius: 22px;
    background: var(--profile-soft-2);
    border: 1px solid var(--profile-border);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 28px rgba(20, 34, 58, .08);
}

.profile-field {
    height: 100%;
    padding: 1rem;
    border: 1px solid var(--profile-border);
    border-radius: 16px;
    background: #ffffff;
    color: var(--profile-dark);
}

.profile-field-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--profile-soft-2);
    color: #0665d0;
}

/* Editor */
.editor-info-card {
    border: 1px solid var(--profile-border);
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0%, rgba(6, 101, 208, .08), transparent 32%),
        var(--profile-soft);
    color: var(--profile-dark);
}

.variable-chip {
    margin: 0 6px 8px 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
}

#descriptionEditor,
.ql-editor {
    min-height: 285px;
    font-size: 15px;
    color: var(--profile-dark);
}

.ql-toolbar.ql-snow {
    border-color: var(--profile-border);
    border-radius: 16px 16px 0 0;
    background: #f8fbff;
}

.ql-container.ql-snow {
    border-color: var(--profile-border);
    border-radius: 0 0 16px 16px;
    background: #fff;
}

/* Listing kartice */
.listing-card {
    height: 100%;
    border: 1px solid var(--profile-border);
    border-radius: 18px;
    background: #fff;
    color: var(--profile-dark);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.listing-card:hover {
    transform: translateY(-2px);
    border-color: var(--profile-border-strong);
    box-shadow: var(--profile-shadow-sm);
}

.listing-img {
    width: 74px;
    height: 74px;
    border-radius: 16px;
    object-fit: cover;
    background: #edf2f7;
    border: 1px solid var(--profile-border);
}

.listing-placeholder {
    width: 74px;
    height: 74px;
    border-radius: 16px;
    background: var(--profile-soft-2);
    border: 1px solid var(--profile-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.listing-title {
    color: var(--profile-dark);
    line-height: 1.35;
}

.listing-title:hover {
    color: #0665d0;
}

/* Modern tabs */
.nav-tabs-modern {
    gap: .45rem;
    padding: 1rem 1rem .95rem;
    border-bottom: 1px solid var(--profile-head-border);
    background:
        radial-gradient(circle at 0% 0%, rgba(6, 101, 208, .24), transparent 32%),
        linear-gradient(135deg, var(--profile-head) 0%, var(--profile-head-2) 100%);
    border-radius: var(--profile-radius) var(--profile-radius) 0 0;
}

.nav-tabs-modern .nav-link {
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .86);
    font-weight: 800;
    padding: .65rem .95rem;
}

.nav-tabs-modern .nav-link:hover {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .28);
    color: #ffffff;
}

.nav-tabs-modern .nav-link.active {
    background: #ffffff;
    border-color: #ffffff;
    color: #111827;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
}

.nav-tabs-modern .nav-link.active i {
    color: #0665d0;
}

/* Preview */
.template-preview-card {
    border: 1px solid var(--profile-border);
    border-radius: 16px;
    background: #fff;
    color: var(--profile-dark);
}

/* Badge fix */
.badge.bg-body-light,
.listing-card .badge.bg-body-light {
    background: #eef2f7 !important;
    color: #334155 !important;
    border: 1px solid var(--profile-border);
}

/* Mobile */
@media (max-width: 767.98px) {
    .olx-hero {
        border-radius: 18px;
    }

    .stat-card {
        min-height: auto;
    }

    .profile-avatar,
    .profile-avatar-placeholder {
        width: 82px;
        height: 82px;
        border-radius: 20px;
    }

    .nav-tabs-modern {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: .95rem;
    }

    .nav-tabs-modern .nav-link {
        white-space: nowrap;
    }
}