:root {
    --footer-bg-start: #0c1f3f;
    --footer-bg-end: #0d6efd;
    --footer-glow: #9ed0ff;
    --footer-text: #f5f7ff;
}

body {
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: #fff9e6;
    border: 1px solid #ffe4b5;
    color: #5c4505;
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
}

.header-disclaimer-text {
    line-height: 1.35;
}

.header-disclaimer-close {
    border: none;
    background: transparent;
    color: #c0392b;
    padding: 0.15rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-disclaimer-close:hover {
    color: #a93226;
}

.container {
    max-width: 1200px;
    flex: 1;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
}

.card-header {
    background-color: #fff;
    border-bottom: none;
}

.password-progress {
    width: 100%;
    height: 0.75rem;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background-color: #e9ecef;
    border-radius: 0.375rem;
}

.password-progress::-webkit-progress-bar {
    background-color: #e9ecef;
    border-radius: 0.375rem;
}

.password-progress::-webkit-progress-value {
    background-color: var(--progress-fill, var(--bs-primary));
    border-radius: 0.375rem;
    transition: width 0.2s ease;
}

.password-progress::-moz-progress-bar {
    background-color: var(--progress-fill, var(--bs-primary));
    border-radius: 0.375rem;
}

.table th {
    background-color: #f8f9fa;
    white-space: nowrap;
}

.table-responsive {
    overflow-x: visible;
    padding: 0 0.25rem;
}

.inventory-table {
    table-layout: fixed;
    width: 100%;
}

.inventory-table th,
.inventory-table td {
    vertical-align: top;
    word-break: break-word;
    padding: 0.5rem 0.35rem;
    font-size: 0.95rem;
}

.inventory-table .name-cell,
.inventory-table .info-cell,
.inventory-table .attachments-cell {
    white-space: normal;
}

.inventory-table .attachments-cell {
    max-width: 140px;
    word-break: break-word;
    font-size: 0.9rem;
}

.inventory-table .name-cell {
    min-width: 140px;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inventory-table .info-cell {
    max-width: 180px;
}

.inventory-table .actions-cell {
    width: 100px;
    white-space: nowrap;
}

.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.search-input-wrapper {
    position: relative;
    max-width: 340px;
    min-width: 200px;
}

#searchInput {
    min-width: 0;
    padding-right: 2.4rem;
}

.clear-search-btn {
    position: absolute;
    right: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #dc3545;
    padding: 0;
    line-height: 1;
    display: none;
}

.clear-search-btn.show {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.clear-search-btn .bi {
    font-size: 0.8rem;
}

.list-group-item.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.modal-content {
    border-radius: 8px;
}

.site-footer {
    margin-top: auto;
    width: 100%;
    color: var(--footer-text);
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.08), transparent 32%), radial-gradient(circle at 80% 0%, rgba(255,255,255,0.07), transparent 28%), linear-gradient(135deg, var(--footer-bg-start), var(--footer-bg-end));
    position: relative;
    overflow: hidden;
    padding: 0.9rem 0 0.5rem;
}

.site-footer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, transparent 35%, transparent 100%);
    pointer-events: none;
}

.site-footer .container {
    position: relative;
    z-index: 1;
    padding-top: 0;
    padding-bottom: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    align-items: start;
    justify-content: center;
    gap: 1rem;
    text-align: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    max-width: 520px;
    margin: 0 auto;
}

.footer-title {
    font-weight: 700;
    letter-spacing: 0.01em;
    margin-bottom: 0.15rem;
}

.footer-subtitle {
    margin: 0 0 0.18rem 0;
    color: rgba(245, 247, 255, 0.8);
}

.footer-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.mobile-page .footer-content {
    text-align: center;
}

.mobile-page .footer-meta {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.25rem;
}

.mobile-page .footer-meta::-webkit-scrollbar {
    display: none;
}

.mobile-page .footer-pill,
.mobile-page .footer-link {
    display: inline-flex;
    width: auto;
    text-align: center;
    white-space: nowrap;
    justify-content: center;
}

.mobile-page .footer-links {
    justify-content: center;
}

.footer-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.18rem 0.45rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--footer-text);
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.75rem;
}

.footer-link {
    color: var(--footer-text);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-disclaimer {
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 0.6rem 0.65rem;
    max-width: 640px;
    margin: 0 auto;
    color: rgba(245, 247, 255, 0.92);
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.22rem 0.45rem;
    background: rgba(255,255,255,0.14);
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.2);
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.footer-disclaimer p {
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.footer-disclaimer p:last-child {
    margin-bottom: 0;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-top: 0.8rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(255,255,255,0.18);
    color: rgba(245, 247, 255, 0.85);
    font-size: 0.86rem;
    text-align: center;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.footer-link-text {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    color: rgba(245, 247, 255, 0.9);
}

.footer-size-note {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(245, 247, 255, 0.72);
}

.footer-size-note .bi {
    font-size: 0.75rem;
}

/* Auth/login page compression to avoid page scroll */
.auth-page .container {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.auth-page .card {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

.auth-page .card-body {
    padding: 0.75rem;
}

.auth-page .card-header {
    padding: 0.5rem 0.75rem;
}

.auth-page .nav-tabs .nav-link {
    padding: 0.35rem 0.65rem;
}

.auth-page .site-footer {
    padding: 0.8rem 0 0.5rem;
}

.auth-page .footer-content {
    gap: 1rem;
}

.auth-page .footer-brand {
    gap: 0.5rem;
    max-width: 520px;
}

.auth-page .footer-subtitle {
    margin-bottom: 0.12rem;
}

.auth-page .footer-pill {
    padding: 0.18rem 0.45rem;
    font-size: 0.75rem;
}

.auth-page .footer-disclaimer {
    padding: 0.4rem 0.5rem;
    max-width: 520px;
}

.auth-page .footer-badge {
    padding: 0.18rem 0.38rem;
}

.auth-page .footer-disclaimer p {
    margin-bottom: 0.35rem;
}

.auth-page .footer-bottom {
    margin-top: 0.8rem;
    padding-top: 0.55rem;
    gap: 0.25rem;
    font-size: 0.8rem;
}

.auth-page .footer-links {
    gap: 0.25rem;
}

.auth-page .footer-link-text {
    padding: 0.16rem 0.4rem;
}

.attachment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.attachments-cell {
    max-width: 260px;
    white-space: normal;
}

.attachment-link {
    border: none;
    background: none;
    padding: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0d6efd;
    cursor: pointer;
    word-break: break-word;
    display: block;
    text-align: left;
}

.attachment-link:hover {
    text-decoration: underline;
    color: #0a58ca;
}

.attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #495057;
}

.attachment-remove {
    border: none;
    background: none;
    color: #dc3545;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.attachment-remove:hover {
    text-decoration: underline;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 1);
}

.navbar-nav .nav-item .nav-link {
    background-color: #fff;
    color: #007bff;
    border-radius: 5px;
    padding: 8px 15px;
    transition: background-color 0.3s, color 0.3s;
}

.navbar-nav .nav-item .nav-link:hover {
    background-color: #0056b3;
    color: #fff;
}

.navbar-brand {
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: #e9ecef !important;
}

.navbar-text {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.95rem;
}

.navbar-text .bi-person-circle {
    font-size: 1.2rem;
}

.navbar-text:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

#profileForm .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.text-primary {
    text-decoration: none;
    font-size: 0.9rem;
}

.text-primary:hover {
    text-decoration: underline;
}

#resetPasswordFields {
    transition: all 0.3s ease;
}

.form-label {
    margin-bottom: 0.25rem;
}

.mb-3 {
    margin-bottom: 0.75rem !important;
}

.card-body {
    padding: 1rem;
}

.small {
    font-size: 0.75rem;
}

.total-value-highlight {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-weight: 600;
    color: #198754;
    background: rgba(25, 135, 84, 0.08);
    padding: 2px 8px;
    border-radius: 8px;
}

.total-value-highlight .text-currency {
    font-weight: 700;
}

.table td {
    word-break: break-word;
}

.action-bar .btn {
    white-space: nowrap;
}

.action-bar {
    gap: 0.5rem;
}

.insurance-cta-banner {
    background: #fff7e6;
    border: 1px solid #ffe1a7;
    border-radius: 8px;
    padding: 0.65rem 0.8rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.insurance-cta-banner.insurance-banner-compact {
    padding: 0.5rem 0.75rem;
}

.insurance-cta-text {
    font-size: 0.95rem;
    color: #664d03;
    line-height: 1.4;
}

.insurance-toggle {
    color: #b07600;
    font-weight: 600;
    padding-left: 0;
    padding-right: 0;
}

.insurance-toggle:hover {
    color: #8a5c00;
    text-decoration: underline;
}
