main > .container {
    /* padding: 70px 15px 20px;*/
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.not-set {
    color: var(--bs-danger);
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px var(--bs-body-color);
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px var(--bs-body-color);
    border-bottom-width: 0;
}

.grid-view th {
    white-space: nowrap;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: var(--bs-secondary-color);
}

.error-summary {
    color: var(--bs-danger-text-emphasis);
    background: var(--bs-danger-bg-subtle);
    border-left: 3px solid var(--bs-danger-border-subtle);
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

/* align navbar brand baseline with nav links */
.navbar > .container,
.navbar > .container-fluid {
    align-items: baseline;
}

/* align the logout "link" (button in form) of the navbar */
.nav li > form > button.logout {
    color: var(--bs-navbar-color);
}

@media (max-width: 767.98px) {
    .navbar-nav .nav-link.logout {
        display: block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}

.navbar-nav .nav-link.logout:focus,
.navbar-nav .nav-link.logout:hover {
    color: var(--bs-navbar-hover-color);
}

/* footer logo: light logo by default (light bg-body-tertiary), dark logo for dark theme */
.footer-logo-dark { display: none; }

[data-bs-theme="dark"] .footer-logo-light { display: none; }
[data-bs-theme="dark"] .footer-logo-dark  { display: inline-block; }

/* login inputs: seamless icon inside input (Volt style) */
.login-split-card .input-group {
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    overflow: hidden;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.login-split-card .input-group .input-group-text {
    background: transparent;
    border: 0;
    padding-left: 1rem;
    padding-right: .75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-split-card .input-group .form-control {
    border: 0;
    background: transparent;
}

.login-split-card .input-group .form-control:focus {
    box-shadow: none;
}

.login-split-card .input-group:focus-within {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25);
}

/* validation styles for login split card (browsers with :has()) */
@supports selector(.input-group:has(.is-invalid)) {
    .login-split-card .input-group:has(.is-invalid) ~ .invalid-feedback {
        display: block;
        margin-top: .35rem;
        margin-bottom: .5rem;
    }

    .login-split-card .input-group:has(.is-invalid) {
        border-color: var(--bs-danger);
    }

    .login-split-card .input-group:has(.is-invalid):focus-within {
        box-shadow: 0 0 0 .25rem rgba(var(--bs-danger-rgb), .25);
    }
}

/* fallback validation styles for login split card (browsers without :has()) */
@supports not selector(.input-group:has(.is-invalid)) {
    .login-split-card .invalid-feedback:not(:empty) {
        display: block;
        margin-top: .35rem;
        margin-bottom: .5rem;
    }

    .login-split-card .input-group .form-control.is-invalid {
        border: var(--bs-border-width) solid var(--bs-danger);
    }

    .login-split-card .input-group .form-control.is-invalid:focus {
        box-shadow: 0 0 0 .25rem rgba(var(--bs-danger-rgb), .25);
    }
}

/* login split card */
.login-split-card {
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .10);
    background-color: var(--bs-gray-100);
    width: 100%;
    max-width: 900px;
}

.login-split-card-wide {
    max-width: 960px;
}

.login-brand-title {
    font-size: 1.75rem;
    line-height: 1.3;
}

.login-brand-text {
    font-size: .9rem;
}

.login-brand-panel {
    background: linear-gradient(135deg, #83C933 0%, #95daf1 40%, #ffffff 100%);
    position: relative;
    min-height: 480px;
}

.login-brand-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(241, 138, 42, .25) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(131, 201, 51, .2) 0%, transparent 40%);
    pointer-events: none;
}

.login-btn {
    background: linear-gradient(135deg, #40B3D8, #3a9cbd);
    border: none;
    font-weight: 600;
    letter-spacing: .02em;
    transition: opacity .2s, transform .1s;
}

.login-btn:hover {
    opacity: .9;
    transform: translateY(-1px);
}

.login-btn:active {
    transform: translateY(0);
}

/* dark mode login card */
[data-bs-theme="dark"] .login-split-card {
    background-color: var(--bs-body-bg);
    box-shadow: 0 0 0 1px var(--bs-border-color), 0 4px 24px rgba(0, 0, 0, .4);
}

[data-bs-theme="dark"] .login-mobile-logo {
    filter: invert(1);
}

/* contact form textarea height */
.site-contact textarea.form-control {
    height: 140px;
}

/* captcha: blend with card background */
.site-contact img[src*="captcha"] {
    border-radius: var(--bs-border-radius);
    mix-blend-mode: multiply;
}

/* dark mode: invert captcha for visibility on dark background */
[data-bs-theme="dark"] .site-contact img[src*="captcha"] {
    mix-blend-mode: screen;
    filter: invert(1) hue-rotate(180deg);
}

/* centered page layout */
.site-login,
.site-contact,
.site-index,
.site-error,
.site-about,
.site-contact-success {
    flex: 1;
}

.site-error .site-error-content,
.site-about .site-about-content,
.site-contact-success .site-contact-success-content {
    width: 100%;
    max-width: 90%;
}

@media (min-width: 576px) {
    .site-error .site-error-content,
    .site-about .site-about-content,
    .site-contact-success .site-contact-success-content {
        max-width: 80%;
    }
}

@media (min-width: 768px) {
    .site-error .site-error-content,
    .site-about .site-about-content,
    .site-contact-success .site-contact-success-content {
        max-width: 60%;
    }
}

@media (min-width: 992px) {
    .site-error .site-error-content,
    .site-about .site-about-content,
    .site-contact-success .site-contact-success-content {
        max-width: 50%;
    }
}

/* hero banner */
.hero-banner {
    background: linear-gradient(135deg, #83C933 0%, #95daf1 40%, #ffffff 100%);
    position: relative;
}

.hero-lead {
    max-width: 520px;
}

.hero-logo {
    height: 120px;
    /* opacity: .45; */
    right: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        radial-gradient(circle at 15% 85%, rgba(241, 138, 42, .3) 0%, transparent 45%),
        radial-gradient(circle at 85% 15%, rgba(131, 201, 51, .25) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(64, 179, 216, .15) 0%, transparent 60%);
    pointer-events: none;
}

/* extension cards */
.extension-card {
    transition: transform .15s ease-in-out, box-shadow .15s ease-in-out;
}

.extension-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12) !important;
}

.extension-icon {
    font-size: 1.5rem;
    line-height: 1;
}

/* dark mode: extension cards */
[data-bs-theme="dark"] .extension-card {
    background-color: var(--bs-body-bg);
    box-shadow: 0 0 0 1px var(--bs-border-color), 0 2px 8px rgba(0, 0, 0, .3);
}

[data-bs-theme="dark"] .extension-card:hover {
    box-shadow: 0 0 0 1px var(--bs-border-color), 0 8px 24px rgba(0, 0, 0, .4) !important;
}

.workbook-color-picker {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}

@media (max-width: 576px) {
    .workbook-color-picker {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.workbook-color-option {
    position: relative;
}

.workbook-color-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.workbook-color-label {
    min-height: 58px;
    border: 2px solid #dee2e6;
    border-radius: .75rem;
    padding: .65rem .75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .65rem;
    background: #fff;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out, transform .05s ease-in-out;
    user-select: none;
}

.workbook-color-label:active {
    transform: scale(.98);
}

.workbook-color-input:checked + .workbook-color-label {
    border-color: #0d6efd;
    box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .15);
}

.workbook-color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, .2);
    flex: 0 0 auto;
}

.workbook-color-name {
    font-size: .95rem;
}

.form-submit-group {
    margin-top: 20px;
    padding-top: 20px;

    text-align: center;
}

.control-label {
    margin-bottom: 0.5rem;
}
.save, .reset {
    min-width: 200px;
    margin-bottom: 10px;
}
.help-block {
    font-size: 0.8rem;
    color: red;
}

.offcanvas.offcanvas-bottom.mobile-bottom-sheet {
    --bs-offcanvas-height: 95vh;
    --bs-offcanvas-height: 95dvh;

    height: 95vh !important;
    height: 95dvh !important;
    max-height: 95vh !important;
    max-height: 95dvh !important;

    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}


.ui-datepicker {
    background: #fff !important;
    border: 1px solid #ccc !important;
    font-family: Arial, sans-serif !important;
    font-size: 14px !important;
    color: #333 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
    padding: 10px !important;
    border-radius: 4px !important;
}

.ui-datepicker-header {
    background: #007bff !important;
    color: #fff !important;
    border-bottom: 1px solid #0056b3 !important;
    padding: 5px 10px !important;
    font-weight: bold !important;
    border-radius: 4px 4px 0 0 !important;
}

.ui-datepicker-title {
    font-size: 16px !important;
}

.ui-datepicker-prev, .ui-datepicker-next {
    color: #fff !important;
    text-shadow: none !important;
    opacity: 0.8 !important;
}

.ui-datepicker-prev:hover, .ui-datepicker-next:hover {
    opacity: 1 !important;
}

.ui-datepicker-calendar th {
    color: #007bff !important;
    font-weight: bold !important;
    padding: 5px !important;
    border-bottom: 1px solid #ddd !important;
}

.ui-datepicker-calendar td {
    /*    padding: 5px !important; */
    text-align: center !important;
    border: 1px solid transparent !important;
}

.ui-datepicker-calendar td a {
    display: block !important;
    color: #007bff !important;
    text-decoration: none !important;
    padding: 5px !important;
    border-radius: 4px !important;
}

.ui-datepicker-calendar td a:hover {
    background: #007bff !important;
    color: #fff !important;
}

.ui-datepicker-calendar .ui-state-active {
    background: #0056b3 !important;
    color: #fff !important;
    font-weight: bold !important;
    border-radius: 4px !important;
}

.ui-datepicker-calendar .ui-state-disabled {
    color: #ccc !important;
}

.ui-datepicker-today a {
    border: 1px solid #007bff !important;
    font-weight: bold !important;
}

.stock-card-link {
    display: block;
}

.stock-card {
    min-height: auto !important;
    height: auto !important;
    transition: background-color .15s ease-in-out, border-color .15s ease-in-out;
    margin-bottom: 0.5rem !important;
}
.history-entry-card {
    margin-bottom: 0.5rem !important;
}

.stock-card:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

.stock-card-body {
    min-height: auto !important;
    padding: .5rem .75rem;
}

.stock-card-title {
    line-height: 1.2;
}

.stock-card-balance {
    white-space: nowrap;
}

.mobile-entry-sheet {
    --bs-offcanvas-height: 95dvh;
    height: 95dvh !important;
    max-height: 95dvh !important;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

.mobile-entry-sheet .offcanvas-body {
    overflow-y: auto;
    padding-bottom: 1rem;
}

.mobile-entry-sheet .offcanvas-footer {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    background: #fff;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}

.mobile-action-buttons {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    padding-top: .5rem;
    padding-bottom: .75rem;
}

.ui-datepicker {
    z-index: 2000 !important;
}

.stock-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
}

.history-mobile-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .5rem;
}

.history-mobile-stat {
    border: 1px solid #dee2e6;
    border-radius: .75rem;
    padding: .6rem .5rem;
    background: #fff;
    text-align: center;
}

.history-entry-card {
    min-height: auto !important;
}

.history-entry-card .card-body {
    min-height: auto !important;
}

.ui-datepicker {
    z-index: 2000 !important;
}



.workbook-card {
    min-height: 180px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 1rem;
    transition: transform .12s ease-in-out, box-shadow .12s ease-in-out, border-color .12s ease-in-out;
}

.workbook-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .10);
    border-color: rgba(0, 0, 0, .18);
}

.workbook-card:active {
    transform: translateY(0);
    box-shadow: 0 .25rem .5rem rgba(0, 0, 0, .08);
}

.workbook-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .75);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.workbook-card-title {
    font-weight: 700;
}

.workbook-card-subtitle {
    color: rgba(0, 0, 0, .55);
    font-size: .95rem;
}

/* Ovo je ključno da edit dugme bude iznad stretched-link-a */
.workbook-card-actions {
    position: relative;
    z-index: 2;
}

.mobile-item-suggestions {
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    background: #fff;
    overflow: hidden;
    max-height: 220px;
    overflow-y: auto;
}

.mobile-item-suggestion {
    display: block;
    width: 100%;
    border: 0;
    background: #fff;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #f1f3f5;
}

.mobile-item-suggestion:last-child {
    border-bottom: 0;
}

.mobile-item-suggestion:active,
.mobile-item-suggestion:hover {
    background: #f8f9fa;
}
.entry-action-buttons {
    align-items: stretch;
}

.entry-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    min-height: 56px;
    border: 0;
    border-radius: 1rem;
    font-weight: 700;
    box-shadow: 0 .35rem .9rem rgba(0, 0, 0, .10);
    transition: transform .12s ease-in-out, box-shadow .12s ease-in-out, filter .12s ease-in-out;
}

.entry-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 .5rem 1.1rem rgba(0, 0, 0, .14);
    filter: brightness(1.02);
}

.entry-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 .25rem .6rem rgba(0, 0, 0, .10);
}

.entry-action-in {
    color: #fff;
    background: linear-gradient(135deg, #198754, #28a745);
}

.entry-action-out {
    color: #fff;
    background: linear-gradient(135deg, #dc3545, #f05a68);
}

.entry-action-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .22);
    font-size: 1rem;
}

.entry-action-text {
    line-height: 1;
}

@media (max-width: 420px) {
    .entry-action-btn {
        min-height: 52px;
        border-radius: .85rem;
        font-size: .95rem;
    }

    .entry-action-icon {
        width: 28px;
        height: 28px;
    }
}

.mobile-action-buttons {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    padding-top: .5rem;
    padding-bottom: .75rem;
}

.mobile-entry-action-buttons {
    align-items: stretch;
}

.mobile-entry-action-btn {
    min-height: 54px;
    border-radius: 1rem;
    font-size: .95rem;
    box-shadow: 0 .3rem .8rem rgba(0, 0, 0, .10);
}

.mobile-entry-action-btn .entry-action-icon {
    width: 28px;
    height: 28px;
    font-size: .95rem;
}

.mobile-entry-action-btn .entry-action-text {
    white-space: nowrap;
}

@media (max-width: 360px) {
    .mobile-entry-action-btn {
        min-height: 50px;
        font-size: .9rem;
        gap: .45rem;
        border-radius: .85rem;
    }

    .mobile-entry-action-btn .entry-action-icon {
        width: 26px;
        height: 26px;
        font-size: .85rem;
    }
}

/* Global button polish */
.btn {
    border-radius: .85rem;
    font-weight: 600;
    transition:
        transform .12s ease-in-out,
        box-shadow .12s ease-in-out,
        filter .12s ease-in-out,
        background-color .12s ease-in-out,
        border-color .12s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
}

.btn:active {
    transform: translateY(0);
}

/* Veća dugmad */
.btn-lg {
    border-radius: 1rem;
    font-weight: 700;
}

/* Mala dugmad da ne izgledaju kao pilule ogromnog radijusa */
.btn-sm {
    border-radius: .65rem;
    font-weight: 600;
}

/* Glavna akcijska dugmad dobijaju blagu senku */
.btn-primary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info {
    box-shadow: 0 .25rem .7rem rgba(0, 0, 0, .10);
}

.btn-primary:hover,
.btn-success:hover,
.btn-danger:hover,
.btn-warning:hover,
.btn-info:hover {
    box-shadow: 0 .4rem .95rem rgba(0, 0, 0, .14);
}

/* Outline dugmad neka ostanu mirnija */
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger {
    box-shadow: none;
}

/* Dugmad u dropdownima i navbaru ne treba da "skaču" */
.dropdown-menu .btn,
.navbar .btn {
    transform: none;
}
