*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

:root {
    --clr-bg: #f5f8fa;
    --clr-card: #fff;
    --clr-muted: #6c757d;
    --clr-primary: #c43721;
    --clr-primary-hover: #961a27;
    --clr-accept: #22c55e;
    --clr-accept-bg: #e6faee;
    --clr-warn: #fb8c00;
    --clr-warn-bg: #fff4e3;
    --clr-err: #dc2626;
    --clr-err-bg: #fee2e2;
    --clr-info: #0891b2;
    --clr-info-bg: #e0f7ff;
    --clr-border: #e5e7eb;
    --clr-blue-soft: #e8f0ff;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    --radius: .5rem;
}

body {
    background: var(--clr-bg) !important;
    color: #212529;
}

.tar-bg {
    background: var(--clr-bg);
}

.hero-section {
    padding: 30px;
    padding-bottom: 80px;
    margin-top: 30px;
    border-radius: var(--bs-border-radius);
}

.text-red {
    color: var(--clr-primary);
}

.bg-light-gray {
    background-color: #f8f9fa;
}


.text-brand {
    color: var(--clr-primary) !important;
}


.step-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin: 0 auto 20px auto;
    position: relative;
    z-index: 2;
}

.step-circle.red {
    background: var(--clr-primary);
    color: white;
}

.timeline-connector {
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #e9ecef;
    z-index: 1;
}

.accordion-button:not(.collapsed) {
    color: var(--clr-primary);
    background-color: #f8f9fa;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .125);
}

.accordion-button:focus {
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.partner-box {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    height: 100%;
}

.footer-cta {
    background-color: #111;
    color: white;
    border-radius: 15px;
    padding: 60px;
}


.timeline-step {
    position: relative;
    z-index: 2;
    padding: 10px;
    border-radius: 10px;
    transition: transform 0.3s ease;
}


.timeline-step:hover {
    transform: translateY(-10px);
}

.step-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin: 0 auto 20px auto;
    position: relative;
    z-index: 2;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timeline-connector {
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #e9ecef 0%, #e9ecef 100%);
    z-index: 1;
}


.timeline-step:hover .step-circle:not(.red) {
    background-color: var(--clr-primary);
    color: white;
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.4);
    transform: scale(1.1);
}

.step-circle.red {
    background: var(--clr-primary);
    color: white;
}

.timeline-step:hover .step-circle.red {
    background-color: white;
    color: var(--clr-primary);
    border: 2px solid var(--clr-primary);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.4);
}


.timeline-step:hover .step-circle.red i {
    animation: spin-icon 0.6s ease-in-out;
}

@keyframes spin-icon {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.duty-item {
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid transparent;
    cursor: default;
}

/* Hover: Lift and add subtle shadow */
.duty-item:hover {
    transform: translateY(-5px);
    background-color: #fff;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.05);
}

.duty-number {
    font-size: 3.5rem;
    line-height: 0.8;
    font-weight: 800;
    color: #e9ecef;
    transition: all 0.4s ease;
    display: block;
}

.duty-item:hover .duty-number {
    color: var(--clr-primary);
    transform: scale(1.1) rotate(-5deg);
}

.duty-title {
    position: relative;
    display: inline-block;
    color: #212529;
    transition: color 0.3s ease;
}

.duty-title::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--clr-primary);
    transition: width 0.3s ease;
}

.duty-item:hover .duty-title::after {
    width: 100%;
}

.navbar-nav .nav-item .nav-link {
    transition: color 0.5s ease;
}

.navbar-nav .nav-item:hover .nav-link {
    color: var(--clr-primary) !important;
}

.navbar-nav .nav-item {
    transition: border-color 0.5s ease;
}

.navbar-nav .nav-item:hover {
    border-color: var(--clr-primary) !important;
}

.card {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--clr-border);
}

.card-title {
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    word-wrap: break-word;
}

.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.card-hover:hover {
    background-color: #e2e6ea !important;
    transform: translateY(-5px);
}

.btn-draw-border {
    position: relative;
    display: inline-block;
    background-image:
        linear-gradient(currentColor, currentColor),
        linear-gradient(currentColor, currentColor),
        linear-gradient(currentColor, currentColor),
        linear-gradient(currentColor, currentColor);

    background-repeat: no-repeat;
    background-size:
        0% 1px,
        /* Top */
        1px 0%,
        /* Right */
        0% 1px,
        /* Bottom */
        1px 0%;
    /* Left */

    background-position:
        top left,
        top right,
        bottom right,
        bottom left;

    transition: background-size 0.3s ease;
}

.btn-draw-border:hover {
    background-size:
        100% 1px,
        1px 100%,
        100% 1px,
        1px 100%;
    transition-delay: 0s, 0.15s, 0.3s, 0.45s;
}

.tar-section {
    margin-bottom: 3rem;
}

.tar-color {
    width: 72px;
    height: 48px;
    border-radius: var(--radius);
    margin-bottom: 0.25rem;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(24, 28, 31, 0.03);
}

.tar-font-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: .4em;
}

.tar-font-lead {
    font-size: 1.13rem;
    color: var(--clr-muted);
    margin-bottom: 2rem;
}

/* Buttons */
.btn-primary,
.btn-primary:active,
.btn-primary:focus {
    background: var(--clr-primary) !important;
    border-color: var(--clr-primary) !important;
    color: #fff;
    font-weight: 600;
    border-radius: .375rem;
    transition: all .12s;
}

.btn-primary-b,
.btn-primary-b:active,
.btn-primary-b:focus {
    background: var(--clr-muted) !important;
    border-color: var(--clr-muted) !important;
    color: #fff;
    font-weight: 600;
    border-radius: .375rem;
    transition: all .12s;
}

.btn-primary-b:hover {
    color: #fff;
    background: #44494e !important;
    border-color: #44494e !important;
}

.btn-primary:hover {
    background: var(--clr-primary-hover) !important;
    border-color: var(--clr-primary-hover) !important;
}

.btn-outline-primary {
    border-color: var(--clr-primary);
    color: var(--clr-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: var(--clr-blue-soft);
    color: var(--clr-primary);
    border-color: var(--clr-primary);
}

.btn-success {
    background: var(--clr-accept) !important;
    border-color: var(--clr-accept) !important;
}

.btn-success:hover {
    background: #179548 !important;
    border-color: #179548 !important;
}

.btn-warning,
.btn-warning:active,
.btn-warning:focus {
    background: var(--clr-warn) !important;
    border-color: var(--clr-warn) !important;
    color: #fff !important;
}

.btn-warning:hover {
    background: #efb44f !important;
    /* Slightly lighter/darker as you like */
    border-color: #efb44f !important;
}

.btn-info,
.btn-info:active,
.btn-info:focus {
    background: var(--clr-info) !important;
    border-color: var(--clr-info) !important;
    color: #fff !important;
}

.btn-info:hover {
    background: #057994 !important;
    border-color: #057994 !important;
}

.btn-outline-warning {
    color: var(--clr-warn) !important;
    border-color: var(--clr-warn) !important;
}

.btn-outline-warning:hover {
    background: var(--clr-warn) !important;
    color: #fff !important;
    border-color: var(--clr-warn) !important;
}

.btn-outline-info {
    color: var(--clr-info) !important;
    border-color: var(--clr-info) !important;
}

.btn-outline-info:hover {
    background: var(--clr-info) !important;
    color: #fff !important;
    border-color: var(--clr-info) !important;
}

/* Custom file input styles */
.tar-drop-area {
    border: 2px dashed var(--clr-primary);
    background: #fafdff;
    border-radius: var(--radius);
    padding: 2rem 1rem;
    text-align: center;
    transition: background 0.2s, border-color 0.2s;
    cursor: pointer;
    margin-bottom: 1em;
    color: var(--clr-muted);
}

.tar-drop-area.dragover {
    background: var(--clr-blue-soft);
    border-color: var(--clr-primary-hover);
    color: var(--clr-primary);
}

.form-label.required::after {
    content: " *";
    color: var(--clr-err);
    font-weight: bold;
}

/* Chips & badges */
.tar-chip {
    display: inline-flex;
    align-items: center;
    background: var(--clr-blue-soft);
    color: var(--clr-primary);
    padding: .19em 1em .19em .8em;
    border-radius: .375rem;
    font-size: .97em;
    margin-right: .4em;
    margin-bottom: .2em;
    gap: .5em;
    box-shadow: 0 1px 4px 0 rgba(24, 28, 31, 0.03);
    max-width: 100%;
    white-space: nowrap;
}

.tar-chip .bi {
    margin-left: .35em;
    cursor: pointer;
    font-size: 1em;
}

.badge-status {
    display: inline-block;
    padding: .35em .75em;
    font-size: .91em;
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
}

.badge-approved {
    background: var(--clr-accept);
}

.badge-rejected {
    background: var(--clr-err);
}

.badge-draft {
    background: var(--clr-muted)
}

/* Custom switch */
.form-switch .form-check-input {
    width: 2.1em;
    height: 1.2em;
    background-color: var(--clr-border);
}

.form-switch .form-check-input:checked {
    background-color: var(--clr-primary);
    border-color: var(--clr-primary);
}

/* Alerts */
.alert-info {
    background: var(--clr-info-bg);
    color: var(--clr-info);
}

.alert-success {
    background: var(--clr-accept-bg);
    color: var(--clr-accept);
}

.alert-warning {
    background: var(--clr-warn-bg);
    color: var(--clr-warn);
}

.alert-danger {
    background: var(--clr-err-bg);
    color: var(--clr-err);
}

/* Multistep */
.tar-step {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.tar-step-item {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: var(--clr-muted);
    position: relative;
    padding-right: 3rem;
}

.tar-step-item.active,
.tar-step-item.completed {
    color: var(--clr-primary);
}

.tar-step-badge {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--clr-border);
    color: var(--clr-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: bold;
    margin-right: .6em;
    border: 2.5px solid var(--clr-border);
    transition: border-color .1s;
}

.tar-step-item.active .tar-step-badge {
    background: var(--clr-primary);
    color: #fff;
    border-color: var(--clr-primary);
}

.tar-step-item.completed .tar-step-badge {
    background: var(--clr-accept-bg);
    border-color: var(--clr-accept);
    color: var(--clr-accept);
}

/* Focus styles for accessibility */
input:focus,
select:focus,
textarea:focus,
.btn:focus {
    outline: 2px solid var(--clr-primary);
    outline-offset: 1px;
    box-shadow: 0 0 0 2px var(--clr-blue-soft);
}

/* Table */
.tar-table-rounded> :not(caption)>*>* {
    border-radius: 0 !important;
}

.tar-table-rounded thead th:first-child {
    border-top-left-radius: var(--radius);
}

.tar-table-rounded thead th:last-child {
    border-top-right-radius: var(--radius);
}

.tar-table-rounded tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--radius);
}

.tar-table-rounded tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--radius);
}

/* Accordion custom */
.accordion-button:not(.collapsed) {
    color: var(--clr-primary);
    background-color: var(--clr-blue-soft);
}

/* Misc */
.tar-divider {
    border-bottom: 1.5px solid var(--clr-border);
    margin: 2.5rem 0 1rem;
}

.tar-nav {
    border-bottom: 1.5px solid var(--clr-border);
    background: var(--clr-card);
    border-radius: var(--radius) var(--radius) 0 0;
}

.tar-nav .nav-link.active {
    color: var(--clr-primary);
    font-weight: 600;
}

.tar-nav .nav-link {
    color: var(--clr-muted);
}

.tar-scroll {
    overflow-x: auto;
}

#affiliationsList {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

#overlay {
    display: none;
}

.overlay {
    position: fixed;
    background-color: rgba(0, 0, 0, .2);
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
}

.profile-picture-uploader {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #f8f9fa;
    border: 2px dashed var(--clr-primary);
    cursor: pointer;
    overflow: hidden;
    /* Ensures the image stays circular */
    transition: background-color 0.2s;
}

.profile-picture-uploader:hover {
    background-color: var(--clr-blue-soft);
}

.profile-picture-uploader img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures the image covers the circle without distortion */
}

.profile-picture-uploader .placeholder-icon {
    font-size: 4rem;
    color: var(--clr-primary);
}

.translate-icon {
    color: #2563eb;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.translate-icon:hover {
    color: #1d4ed8;
    transform: scale(1.1);
}

.translate-icon.translating {
    animation: rotate 1s linear infinite;
}

.hover-bg {
    cursor: pointer;
    transition: background-color 0.2s;
}

.hover-bg:hover {
    background-color: var(--clr-blue-soft);
}

.editable-field {
    cursor: pointer;
}

.delete-file-btn {
    opacity: 0;
    transition: opacity 0.2s;
}

.position-relative:hover .delete-file-btn {
    opacity: 1;
}

.delete-file-btn:hover {
    transform: scale(1.1);
}

/* Category card styling */
.card-header.bg-light {
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #dee2e6;
}

/* Separator between documents */
hr.my-3 {
    border-top: 2px solid #e9ecef;
    opacity: 1;
}

.document-drop-zone {
    transition: all 0.2s ease;
    position: relative;
}

.drop-zone-active {
    background: #e3f2fd !important;
    border: 2px dashed #2563eb !important;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.2);
}

.document-drop-zone:hover {
    border-color: #2563eb;
}

.drag-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(37, 99, 235, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    pointer-events: none;
}

.badge-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.badge-lg {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.event-item {
    transition: background-color 0.2s;
    padding: 0.5rem;
}

.event-item:hover {
    background-color: #f8f9fa;
    border-radius: 0.25rem;
}

.events-list {
    max-height: 400px;
    overflow-y: auto;
}

.events-list::-webkit-scrollbar {
    width: 6px;
}

.events-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.events-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.events-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Make clickable badges more button-like */
.clickable-badge {
    transition: all 0.2s ease;
    cursor: pointer !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.clickable-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.clickable-badge:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.badge-pending {
    background-color: #ffc107 !important;
    color: #000 !important;
    opacity: 0.7;
}

/* Make view history link more button-like */
.btn-view-history {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6c757d;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-view-history:hover {
    color: #495057;
    background-color: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-view-history:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    background-color: #dee2e6;
}

.btn-view-history i {
    font-size: 1rem;
}

.deleted-document-item {
    opacity: 0.5;
    background-color: #f8f9fa;
    padding: 0.5rem;
    border-radius: 0.25rem;
}

.deleted-document-item .badge:not(.bg-secondary) {
    opacity: 0.7;
    filter: grayscale(50%);
}

.deleted-document-item .img-thumbnail,
.deleted-document-item .bg-light {
    opacity: 0.6;
    filter: grayscale(80%);
}

.deleted-file-preview {
    opacity: 0.5;
    filter: grayscale(100%);
}

.user-selection-card {
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #ffffff;
}

.user-selection-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #0d6efd;
}

.user-selection-card:active {
    transform: translateY(0);
}

.user-card-content {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.25rem;
    margin-right: 1.25rem;
    flex-shrink: 0;
}

.user-card-details {
    flex-grow: 1;
}

.user-card-name {
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #212529;
}

.user-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-card-meta-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #495057;
}

.user-card-meta-item i {
    margin-right: 0.5rem;
    color: #6c757d;
    width: 16px;
}

.user-card-meta-item.role {
    color: #0d6efd;
    font-weight: 500;
}

.user-card-meta-item.role i {
    color: #0d6efd;
}

.otp-input-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.otp-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.otp-input:focus {
    border-color: #0d6efd;
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.otp-info {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.resend-link {
    color: #0d6efd;
    cursor: pointer;
    text-decoration: underline;
}

.resend-link:hover {
    color: #0a58ca;
}

.resend-link.disabled {
    color: #6c757d;
    cursor: not-allowed;
    text-decoration: none;
}

/* Fix dropdown in table */
.table-responsive {
    overflow: visible !important;
}

.table tbody tr:last-child .dropup .dropdown-menu {
    bottom: 100%;
    top: auto;
}

/* Ensure dropdown appears above content */
.dropdown-menu {
    position: absolute !important;
    z-index: 1050;
}

/* For last rows, use dropdown instead of dropup */
.table tbody tr:nth-last-child(-n+2) .btn-group {
    position: static;
}

.table tbody tr:nth-last-child(-n+2) .dropdown-menu {
    position: absolute;
    top: 100%;
    bottom: auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.hover-bg {
    transition: background 0.15s;
    cursor: default;
}

.hover-bg:hover {
    background: var(--clr-blue-soft);
    border-radius: var(--radius);
}

.editable-field {
    width: 100%;
}

.field-label {
    font-size: 0.78rem;
    color: var(--clr-muted);
    display: block;
    margin-bottom: 0.1rem;
}

.field-value {
    font-size: 0.95rem;
}

.document-drop-zone {
    transition: all 0.2s;
}

.drop-zone-active {
    border-color: var(--clr-primary) !important;
    background: var(--clr-blue-soft) !important;
}

.drag-overlay {
    position: absolute;
    inset: 0;
    background: rgba(37, 99, 235, 0.08);
    border: 2px dashed var(--clr-primary);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.drop-hint {
    transition: background 0.15s, color 0.15s;
    border-radius: 0 0 var(--radius) var(--radius);
    margin: 0 -0.75rem -0.75rem -0.75rem;
    padding: 0.4rem !important;
}

.drop-hint:hover {
    background: var(--clr-blue-soft);
    color: var(--clr-primary) !important;
}

.drop-hint:hover small {
    color: var(--clr-primary) !important;
}

.drop-hint:hover .bi-cloud-arrow-up {
    transform: translateY(-2px);
    transition: transform 0.15s;
}

.delete-file-btn {
    opacity: 0;
    transition: opacity 0.15s;
}

.position-relative:hover .delete-file-btn {
    opacity: 1;
}

.clickable-badge {
    cursor: pointer;
    transition: opacity 0.15s;
}

.clickable-badge:hover {
    opacity: 0.85;
}

.clickable-link:hover {
    color: var(--clr-primary) !important;
}

.translate-icon {
    color: var(--clr-info);
    font-size: 1rem;
    transition: opacity 0.15s;
}

.translate-icon:hover {
    opacity: 0.7;
}

.translate-icon.translating {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.deleted-document-item {
    opacity: 0.5;
}

.deleted-file-preview {
    filter: grayscale(100%);
}

.btn-view-history {
    background: none;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    color: var(--clr-muted);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-view-history:hover {
    background: var(--clr-blue-soft);
    color: var(--clr-primary);
    border-color: var(--clr-primary);
}

.timeline-item:last-child {
    border-bottom: none !important;
}

.event-item:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Field labels — slightly smaller than value but readable */
.field-label {
    font-size: 0.78rem;
    color: var(--clr-muted);
    display: block;
    margin-bottom: 0.1rem;
}

/* Field values — normal body size */
.field-value {
    font-size: 0.95rem;
}

.hover-bg {
    transition: background 0.15s;
    cursor: default;
}

.hover-bg:hover {
    background: var(--clr-blue-soft);
    border-radius: var(--radius);
}

.field-label {
    font-size: 0.78rem;
    color: var(--clr-muted);
    display: block;
    margin-bottom: 0.1rem;
}

.field-value {
    font-size: 0.95rem;
}

.clickable-badge {
    cursor: pointer;
    transition: opacity 0.15s;
}

.clickable-badge:hover {
    opacity: 0.85;
}

.clickable-link:hover {
    color: var(--clr-primary) !important;
}

.translate-icon {
    color: var(--clr-info);
    font-size: 1rem;
    transition: opacity 0.15s;
}

.translate-icon:hover {
    opacity: 0.7;
}

.translate-icon.translating {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.deleted-document-item {
    opacity: 0.5;
}

.deleted-file-preview {
    filter: grayscale(100%);
}

.btn-view-history {
    background: none;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    color: var(--clr-muted);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-view-history:hover {
    background: var(--clr-blue-soft);
    color: var(--clr-primary);
    border-color: var(--clr-primary);
}

.timeline-item:last-child {
    border-bottom: none !important;
}

.event-item:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.hover-bg {
    cursor: pointer;
    transition: background-color 0.2s;
}

.hover-bg:hover {
    background-color: var(--clr-blue-soft);
}

.editable-field {
    cursor: pointer;
}

.clickable-badge {
    cursor: pointer;
    transition: transform 0.2s;
}

.clickable-badge:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.badge-pending {
    background-color: #ffc107;
    color: #000;
}

.badge-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.translate-icon {
    cursor: pointer;
    transition: color 0.2s;
}

.translate-icon:hover {
    color: #2563eb;
}

.translating {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.deleted-document-item {
    opacity: 0.5;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
}

.deleted-file-preview {
    filter: grayscale(100%);
    opacity: 0.6;
}

.clickable-badge {
    cursor: pointer;
    transition: all 0.2s;
}

.clickable-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .tab-content {
        overflow-x: hidden;
    }
    .tar-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 991px) {
    #header_main .border-start {
        border-left: none !important;
    }
}

/* ── Page header avatar (large) ── */
.tar-page-avatar {
    width: 52px;
    height: 52px;
    font-size: 1.4rem;
    background: var(--clr-primary);
    flex-shrink: 0;
}

/* ── Table row avatar (small) ── */
.tar-avatar-sm {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
    background: var(--clr-primary);
    flex-shrink: 0;
}

/* ── Progress bar ── */
.tar-progress {
    height: 3px;
}

.tar-progress-bar {
    width: 100%;
    background: linear-gradient(90deg, #2563eb 0%, #22c55e 100%);
    height: 3px;
}

/* ── Card header (blue-soft background) ── */
.tar-card-header-soft {
    background: var(--clr-blue-soft);
    border-color: var(--clr-border);
}

/* ── Card header label text ── */
.tar-card-label {
    font-size: 0.88rem;
}

/* ── Search input group max width ── */
.tar-search-group {
    max-width: 480px;
}

/* ── Count badge ── */
.tar-count-badge {
    background: var(--clr-primary);
}

/* ── Table header cell ── */
.tar-th {
    font-size: 0.82rem;
}

/* ── Table data cell ── */
.tar-td {
    font-size: 0.92rem;
}

/* ── Mobile sub-info text (email/language under name) ── */
.tar-td-sub {
    font-size: 0.75rem;
}

/* ── Language badge ── */
.tar-lang {
    font-size: 0.82rem;
}

/* ── Slightly smaller table data cell (e.g. date column) ── */
.tar-td-sm {
    font-size: 0.88rem;
}

/* ── Large spinner ── */
.tar-spinner-lg {
    width: 3rem;
    height: 3rem;
}

/* ── Small button font inside card headers ── */
.tar-btn-xs {
    font-size: 0.75rem;
}

/* ── Pre-line whitespace for complaint reasons ── */
.tar-pre-line {
    white-space: pre-line;
}

/* ── Document thumbnail (image) ── */
.tar-doc-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
}

/* ── Document thumbnail box (non-image) ── */
.tar-doc-thumb-box {
    width: 72px;
    height: 72px;
}

/* ── PDF icon inside doc thumb box ── */
.tar-doc-pdf-icon {
    font-size: 2rem;
}

/* ── Doc info section right padding (space for badge) ── */
.tar-doc-info {
    padding-right: 130px;
}

/* ── Alert body text ── */
.tar-alert-text {
    font-size: 0.85rem;
}

/* ── Warning card header ── */
.tar-card-header-warn {
    background: var(--clr-warn-bg);
    border-color: var(--clr-border);
}

/* ── Warning text colour ── */
.tar-warn-text {
    color: var(--clr-warn);
}

/* ── Warning count badge ── */
.tar-warn-badge {
    background: var(--clr-warn);
}

/* ── Success icon (large) ── */
.tar-success-icon {
    font-size: 1.8rem;
}

/* ── Log entry date ── */
.tar-log-date {
    font-size: 0.78rem;
}

/* ── Timeline event icon ── */
.tar-timeline-icon {
    font-size: 1.4rem;
}

/* ── Tiny button font (validation pencil inside badge) ── */
.tar-btn-xxs {
    font-size: 0.65rem;
}

/* ── Document drop zone card body ── */
.tar-drop-zone-body {
    min-height: 120px;
    position: relative;
}

/* ── Small doc thumbnail (upload zone) ── */
.tar-doc-thumb-sm {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

/* ── PDF icon in upload zone ── */
.tar-doc-pdf-icon-lg {
    font-size: 1.8rem;
}

/* ── Filename text under PDF icon ── */
.tar-doc-filename {
    font-size: 0.65rem;
    max-width: 60px;
}

/* ── Delete file button ── */
.tar-delete-btn {
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
    line-height: 1;
}

/* ── Drop hint text ── */
.tar-drop-hint-text {
    font-size: 0.72rem;
}

/* ── Update drop-hint to include cursor and border ── */
.drop-hint {
    cursor: pointer;
    border-top: 1px dashed var(--clr-border);
}

/* ── Drag overlay icon ── */
.tar-drag-icon {
    font-size: 2rem;
    color: var(--clr-primary);
}

/* ── Drag overlay text ── */
.tar-drag-text {
    color: var(--clr-primary);
}

/* ── City autocomplete dropdown container ── */
.tar-city-dropdown {
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    top: 100%;
    margin-top: 2px;
}

/* ── City autocomplete dropdown item ── */
.tar-city-option {
    cursor: pointer;
    font-size: 0.9rem;
}

/* ── Tab content card — bottom radius only ── */
.tar-tab-content {
    border-radius: 0 0 var(--radius) var(--radius);
}

/* ── Edit mode card border ── */
.tar-edit-card {
    border-color: var(--clr-warn);
    border-width: 1.5px;
}

/* ── Edit mode card header ── */
.tar-card-header-edit {
    background: var(--clr-warn-bg);
    border-color: var(--clr-warn);
}

/* ── Bottom save bar in edit mode ── */
.tar-edit-save-bar {
    background: var(--clr-warn-bg);
    border: 1.5px solid var(--clr-warn);
}

/* ── Small spinner (users table loading) ── */
.tar-spinner-sm {
    width: 1.5rem;
    height: 1.5rem;
}

/* ── Medium avatar (32px — users table) ── */
.tar-avatar-md {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
    background: var(--clr-primary);
    flex-shrink: 0;
}

/* ── Document tile container ── */
.tar-doc-tile {
    width: 110px;
    height: 110px;
    background: var(--clr-bg);
    cursor: pointer;
    padding: 0.75rem;
}

/* ── Image inside document tile ── */
.tar-doc-tile-img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

/* ── PDF icon inside document tile ── */
.tar-doc-pdf-icon-xl {
    font-size: 2.4rem;
    color: var(--clr-err);
}

/* ── Filename below document tile ── */
.tar-doc-tile-name {
    font-size: 0.72rem;
    width: 110px;
    word-break: break-word;
    line-height: 1.3;
}

/* ── Close button on document tile ── */
.tar-close-btn-sm {
    font-size: 0.6rem;
}

/* ── Drop area plus icon ── */
.tar-drop-area-icon {
    font-size: 1.6rem;
}

/* ── Table label column width ── */
.tar-table-label-col {
    width: 40%;
}

/* ── Complaint count label min-width ── */
.tar-complaint-label {
    min-width: 160px;
}


/* ── Table min height (prevents layout jump while loading) ── */
.tar-min-table {
    min-height: 300px;
}

/* ── Status change dropdown min width ── */
.tar-status-dropdown {
    min-width: 250px;
}

/* ── Business lines cell max width ── */
.tar-business-lines-col {
    max-width: 350px;
}

/* ── Subsection (indented conditional block) ── */
.tar-sub-section {
    border-left: 3px solid var(--clr-border);
    padding-left: 1rem;
    background: var(--clr-bg);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding-top: 0.75rem;
    padding-bottom: 0.25rem;
}

/* ── DOB calendar icon trigger ── */
.tar-dob-icon { cursor: pointer; }

/* ── Datepicker dropdown container ── */
.tar-datepicker-dropdown {
    position: absolute;
    z-index: 1050;
    top: calc(100% + 4px);
    left: 0;
    min-width: 280px;
    background: #fff;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    padding: 0.75rem;
}

/* ── Header row inside picker ── */
.tar-datepicker-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--clr-border);
}

/* ── Back button ── */
.tar-datepicker-back {
    padding: 0;
    color: var(--clr-primary);
    text-decoration: none;
}

/* ── Year / month grid ── */
.tar-datepicker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.3rem;
    max-height: 220px;
    overflow-y: auto;
}
.tar-datepicker-grid-months {
    grid-template-columns: repeat(3, 1fr);
    max-height: unset;
    overflow-y: unset;
}

/* ── Year / month cell button ── */
.tar-datepicker-cell {
    background: var(--clr-bg);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    padding: 0.3rem 0.1rem;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: center;
}
.tar-datepicker-cell:hover {
    background: var(--clr-blue-soft);
    border-color: var(--clr-primary);
    color: var(--clr-primary);
}
.tar-datepicker-cell-selected {
    background: var(--clr-primary) !important;
    border-color: var(--clr-primary) !important;
    color: #fff !important;
}

/* ── Weekday header row ── */
.tar-datepicker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 0.25rem;
}
.tar-datepicker-weekdays span {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--clr-muted);
    padding: 0.2rem 0;
}

/* ── Days grid ── */
.tar-datepicker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.15rem;
}
.tar-datepicker-day-blank {
    display: block;
}

/* ── Individual day button ── */
.tar-datepicker-day {
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 0.3rem 0;
    font-size: 0.82rem;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s, color 0.15s;
}
.tar-datepicker-day:hover:not(:disabled) {
    background: var(--clr-blue-soft);
    border-color: var(--clr-primary);
    color: var(--clr-primary);
}
.tar-datepicker-day-disabled {
    color: var(--clr-muted);
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Business line badge in the affiliations table ── */
.tar-business-line-badge {
    background: var(--clr-blue-soft);
    color: var(--clr-primary);
    border: 1px solid var(--clr-primary);
    font-size: 0.75rem;
    font-weight: 500;
}

/* ── Half-width select ── */
.tar-select-half { max-width: 40%; }

/* ── Summary table label column ── */
.tar-summary-label {
    width: 40%;
    font-size: 0.82rem;
    color: var(--clr-muted);
    font-weight: 500;
}
/* ── Email compose textarea ── */
.tar-email-textarea { min-height: 140px; resize: vertical; }

/* ── Sent email body preview ── */
.tar-email-preview { font-size: 0.88rem; white-space: pre-wrap; word-break: break-word; }