html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Helvetica Neue", Arial, sans-serif;
    background: #f5f6f8;
    color: #1f2933;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: min(1100px, 92vw);
    margin: 0 auto;
}

main {
    flex: 1 0 auto;
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e4e7eb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

.main-nav a {
    margin-right: 1rem;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
}

.main-nav a:hover {
    color: #2563eb;
}

.auth-block {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.btn {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background: #2563eb;
    color: #ffffff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}

.btn:hover {
    background: #1d4ed8;
}

.btn-sm {
    padding: 0.3rem 0.65rem;
    font-size: 0.85rem;
    border-radius: 6px;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.btn-danger:hover {
    background: #b91c1c;
}

.hero {
    margin: 2rem 0 1.5rem;
    background: linear-gradient(120deg, #dbeafe, #ffffff);
    padding: 2.5rem;
    border-radius: 16px;
}

.hero h1 {
    margin: 0 0 0.8rem;
    font-size: 2rem;
}

.demand-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.demand-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.4rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.demand-card h3 {
    margin: 0;
    color: #111827;
    font-size: 1.1rem;
}

.demand-card p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #4b5563;
}

.tag {
    display: inline-flex;
    align-items: center;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 9999px;
    padding: 0.1rem 0.75rem;
    font-size: 0.8rem;
}

.form-card {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.form-control, textarea, select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.7rem;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.site-footer {
    margin-top: 2.5rem;
    border-top: 1px solid #e5e7eb;
    padding: 1.5rem 0;
    background: #ffffff;
    color: #6b7280;
    text-align: center;
}

.alert {
    padding: 0.9rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}

.alert-success {
    background: #ecfdf3;
    color: #027a48;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fef3f2;
    color: #b42318;
    border: 1px solid #fecaca;
}

.critical-banner {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.2rem 1.4rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.12), rgba(253, 230, 138, 0.35));
    border: 1px solid rgba(250, 204, 21, 0.35);
    color: #92400e;
    box-shadow: 0 14px 40px rgba(202, 138, 4, 0.12);
}

.critical-banner h3 {
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
    color: #92400e;
}

.critical-banner p {
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

.critical-banner .banner-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #facc15;
    color: #78350f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 10px 25px rgba(250, 204, 21, 0.35);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.table th {
    background: #f9fafb;
    font-weight: 600;
}

.badge {
    display: inline-flex;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    background: #e0f2fe;
    color: #075985;
}

.badge-delivery {
    background: #fef3c7;
    color: #92400e;
}

.badge-metric {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-weight: 600;
    border: 1px solid rgba(37, 99, 235, 0.2);
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
}

.badge-views {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.25);
}

.badge-guarantee {
    background: rgba(244, 114, 182, 0.15);
    color: #be185d;
    border-color: rgba(236, 72, 153, 0.3);
}


.demand-inline-image {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
    margin: 0 auto;
}

.demand-image-block {
    margin: 1.2rem 0;
    text-align: center;
}

.demand-image-caption {
    text-align: center;
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 0.4rem;
}

.demand-details {
    margin: 2.5rem 0;
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.08), #ffffff 70%);
    border-radius: 22px;
    padding: 2.2rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.12);
}

.demand-details__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}

.demand-details__aside {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: flex-end;
}

.demand-details__header h1 {
    margin: 0;
    font-size: 1.9rem;
    color: #0f172a;
}

.demand-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    color: #64748b;
    font-size: 0.95rem;
    margin-top: 0.6rem;
}

.demand-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.demand-status {
    font-size: 0.95rem;
    padding: 0.35rem 0.8rem;
}

.demand-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.6rem;
}

.demand-description {
    margin-top: 1.8rem;
    background: #f8fafc;
    border-radius: 18px;
    padding: 1.6rem;
    border: 1px solid #e2e8f0;
}

.demand-description h2 {
    margin: 0 0 1rem;
    font-size: 1.15rem;
    color: #1f2937;
}

.demand-description__body {
    color: #475569;
    font-size: 1rem;
    line-height: 1.8;
}

.demand-gallery {
    margin-top: 1.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.demand-gallery__item {
    width: 220px;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    align-items: center;
    position: relative;
}

.demand-gallery__thumb {
    width: 220px;
    height: 220px;
    border-radius: 18px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.demand-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.demand-gallery__thumb img:hover {
    transform: scale(1.03);
}

.demand-gallery__caption {
    font-size: 0.95rem;
    color: #ffffff;
    padding: 0.6rem 0.8rem;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.66);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2);
    display: block;
    text-align: center;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
    max-width: calc(100% - 24px);
    margin: 0 auto;
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    pointer-events: none;
}

.demand-gallery__caption::before {
    content: "📌";
    font-size: 1rem;
}

.image-preview {
    margin-top: 1.6rem;
    display: none;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.image-preview.visible {
    display: flex;
}

.image-preview__item {
    width: 220px;
    background: #ffffff;
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
}

.image-preview__thumb {
    width: 100%;
    height: 220px;
    border-radius: 16px;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.12);
}

.image-preview__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.image-preview__thumb img:hover {
    transform: scale(1.02);
}

.image-preview__caption-display {
    min-height: 1.2rem;
    font-size: 0.85rem;
    color: #94a3b8;
    text-align: center;
}

.image-preview__caption-display.has-text {
    color: #475569;
}

.image-preview__caption-btn {
    width: 100%;
    border: 1px solid #2563eb;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 10px;
    padding: 0.35rem 0;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.image-preview__caption-btn:hover {
    background: #dbeafe;
}

.image-preview__input {
    width: 100%;
    min-height: 80px;
    border: 1px solid #cbd5f5;
    border-radius: 10px;
    padding: 0.6rem;
    font-size: 0.9rem;
    resize: vertical;
    display: none;
    background: #fff;
}

.image-preview__input.is-visible {
    display: block;
}

.image-preview__remove {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 0.35rem 0;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-preview__remove:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(220, 38, 38, 0.25);
}

@media (max-width: 720px) {
    .demand-details {
        padding: 1.6rem;
        border-radius: 18px;
    }

    .demand-details__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .demand-details__header h1 {
        font-size: 1.6rem;
    }

    .demand-details__aside {
        flex-direction: row;
        align-items: center;
        gap: 0.8rem;
    }

    .demand-gallery__item {
        width: 48%;
    }

    .demand-gallery__thumb {
        width: 100%;
        height: 200px;
    }

    .image-preview__item {
        width: 48%;
    }

    .image-preview__thumb {
        height: 180px;
    }
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.gallery-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
}

.gallery-lightbox__content {
    position: relative;
    background: #ffffff;
    border-radius: 22px;
    max-width: min(90vw, 960px);
    max-height: 85vh;
    padding: 1.2rem;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.25);
    animation: lightbox-in 0.25s ease;
}

.gallery-lightbox__content img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 14px;
    display: block;
}

.gallery-lightbox__caption {
    margin-top: 0.8rem;
    text-align: center;
    color: #475569;
    font-size: 0.95rem;
}

.gallery-lightbox__close {
    position: absolute;
    top: 0.3rem;
    right: 0.6rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #0f172a;
}

@keyframes lightbox-in {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.status-open {
    background: #dcfce7;
    color: #166534;
}

.status-assigned {
    background: #fef3c7;
    color: #92400e;
}

.status-completed {
    background: #e0e7ff;
    color: #3730a3;
}

.status-closed {
    background: #f1f5f9;
    color: #475569;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .main-nav a {
        margin-right: 0.6rem;
    }

    .hero {
        padding: 1.6rem;
    }
}

body.no-scroll {
    overflow: hidden;
}

.dashboard {
    margin: 2.5rem 0 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.dashboard-header {
    display: grid;
    gap: 1.5rem;
}

.profile-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.8rem;
    display: flex;
    align-items: center;
    gap: 1.6rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    flex-wrap: wrap;
}

.profile-avatar {
    width: 84px;
    height: 84px;
    border-radius: 20px;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    font-weight: 600;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    flex: 1;
    min-width: 220px;
}

.profile-name {
    font-size: 1.65rem;
    font-weight: 600;
    color: #0f172a;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.6rem;
    color: #64748b;
    font-size: 0.95rem;
}

.profile-meta i {
    margin-right: 0.35rem;
}

.profile-tags {
    margin-top: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tag-success {
    background: #ecfdf3;
    color: #15803d;
}

.tag-warning {
    background: #fef3c7;
    color: #b45309;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.profile-actions .btn {
    width: 180px;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
    background: #0f172a;
    color: #ffffff;
}

.btn-secondary:hover {
    background: #1e293b;
}

.btn-light {
    background: #eef2ff;
    color: #1d4ed8;
}

.insight-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.insight {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.4rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.insight-label {
    color: #64748b;
    font-size: 0.9rem;
}

.insight-value {
    display: block;
    margin-top: 0.35rem;
    font-size: 2rem;
    font-weight: 600;
    color: #0f172a;
}

.insight-note {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #94a3b8;
}

.insight-note.insight-note-error {
    color: #f97316;
}

.deposit-tag-group {
    margin-top: 0.8rem;
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: nowrap;
}

.deposit-tag {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.deposit-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.deposit-tag-secondary {
    background: linear-gradient(135deg, #64748b, #475569);
}

.deposit-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1060;
}

.deposit-modal[aria-hidden="false"] {
    display: flex;
}

.deposit-modal__dialog {
    background: #ffffff;
    border-radius: 18px;
    max-width: 420px;
    width: 100%;
    padding: 1.8rem;
    box-shadow: 0 25px 45px rgba(15, 23, 42, 0.18);
    position: relative;
}

.deposit-modal__close {
    border: none;
    background: none;
    font-size: 1.6rem;
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #94a3b8;
    cursor: pointer;
}

.deposit-modal__close:hover {
    color: #1e293b;
}

.deposit-modal__hint {
    margin-top: 0.4rem;
    margin-bottom: 1.2rem;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
}

.deposit-modal__form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #1f2937;
}

.deposit-modal__form input[type="number"] {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    font-size: 1rem;
    color: #0f172a;
    margin-bottom: 1.2rem;
}

.deposit-modal__form input[type="number"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.deposit-modal__actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.8rem;
}

.dashboard-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    padding: 1.8rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    margin: 0;
    font-size: 1.35rem;
}

.card-header p {
    margin: 0.3rem 0 0;
    color: #64748b;
    font-size: 0.93rem;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
    padding: 0.85rem 0.3rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.95rem;
}

.dashboard-table th {
    color: #475569;
    font-weight: 600;
}

.table-title {
    font-weight: 600;
    color: #0f172a;
}

.table-sub {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

.btn-link {
    background: transparent;
    color: #2563eb;
    padding: 0;
    box-shadow: none;
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #475569;
}

.empty-state h3 {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
}

.empty-state p {
    margin: 0 0 1.4rem;
    color: #94a3b8;
}

.apply-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    padding: 1.8rem;
    margin-bottom: 2rem;
}

.apply-header {
    margin-bottom: 1.6rem;
}

.apply-header h2 {
    margin: 0;
    font-size: 1.35rem;
}

.apply-header p {
    margin: 0.4rem 0 0;
    color: #64748b;
    font-size: 0.95rem;
}

.apply-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.4rem;
}

.form-row {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1 1 260px;
}

.delivery-options {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-top: 0.6rem;
}

.delivery-option {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    border: 1px solid #dbeafe;
    background: #f8fafc;
    cursor: pointer;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.delivery-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
}

.delivery-option:hover {
    border-color: #2563eb;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}

.delivery-option span {
    color: #1f2937;
    font-weight: 500;
}

.rich-editor {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #ffffff;
}

.rich-editor .ql-toolbar {
    border-radius: 10px 10px 0 0;
}

.rich-editor .ql-container {
    height: 280px;
    border-radius: 0 0 10px 10px;
}

.rich-editor .ql-editor .demand-image-block,
.rich-editor .ql-editor .demand-inline-image,
.rich-editor .ql-editor img {
    display: none !important;
}

.input-with-prefix {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
}

.input-with-prefix span {
    background: #f1f5f9;
    padding: 0.6rem 0.8rem;
    color: #475569;
    border-right: 1px solid #d1d5db;
}

.input-with-prefix input {
    border: none;
    flex: 1;
    padding: 0.6rem 0.75rem;
    font-size: 1rem;
}

.input-with-prefix input:focus {
    outline: none;
}

.contact-input {
    display: flex;
    align-items: center;
    background: linear-gradient(120deg, #f8fafc, #eef2ff);
    border: 1px solid rgba(99, 102, 241, 0.28);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-input:focus-within {
    border-color: rgba(79, 70, 229, 0.75);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.15);
}

.contact-input__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #6366f1, #2563eb);
    color: #ffffff;
}

.contact-input input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.8rem 0.9rem;
    font-size: 1rem;
    color: #0f172a;
}

.contact-input input::placeholder {
    color: #94a3b8;
}

.contact-input input:focus {
    outline: none;
}

.apply-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.apply-tip {
    font-size: 0.9rem;
    color: #94a3b8;
}

.apply-empty {
    text-align: center;
    padding: 2.2rem 1.5rem;
    color: #475569;
}

.apply-empty h3 {
    margin: 0 0 0.6rem;
    font-size: 1.3rem;
}

.apply-empty p {
    margin: 0 0 1.3rem;
    color: #94a3b8;
}

.application-list {
    display: grid;
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.application-item {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.3rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.04), rgba(255, 255, 255, 1));
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.application-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.applicant {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.applicant img,
.application-item .avatar-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
}

.applicant span {
    display: block;
    color: #94a3b8;
    font-size: 0.85rem;
}

.application-price {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
}

.application-body {
    color: #475569;
    line-height: 1.7;
    white-space: pre-line;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem 1.2rem;
    font-size: 0.95rem;
    margin-top: 0.75rem;
}

.application-contact {
    margin-top: 0.85rem;
    padding: 0.95rem 1.15rem;
    border-radius: 0.9rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(99, 102, 241, 0.08));
    border: 1px solid rgba(79, 70, 229, 0.18);
    font-size: 0.92rem;
    color: #0f172a;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.application-contact .contact-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: #3730a3;
    letter-spacing: 0.02em;
}

.application-contact .contact-label::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.application-contact .contact-value {
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #0f172a;
    padding: 0.65rem 0.75rem;
    border-radius: 0.65rem;
    background: rgba(15, 23, 42, 0.05);
}

.application-contact .contact-hint {
    color: #475569;
    line-height: 1.6;
}

.application-contact .contact-hint strong {
    color: #1d4ed8;
}

.demand-contact {
    margin-top: 1.2rem;
}

.application-metrics {
    margin-top: 0.9rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.6rem;
    background: rgba(148, 163, 184, 0.08);
    border: 1px dashed rgba(148, 163, 184, 0.4);
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
}

.application-metrics .metric-label {
    display: block;
    font-size: 0.78rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.15rem;
}

.application-metrics .metric-value {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
}

.application-metrics .metric-value.metric-money {
    color: #0ea5e9;
}

.application-chat-actions {
    margin-top: 0.75rem;
    display: flex;
    justify-content: flex-start;
}

.chat-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1100;
}

.chat-modal[aria-hidden="false"] {
    display: flex;
}

.chat-modal__dialog {
    background: #ffffff;
    border-radius: 18px;
    max-width: 720px;
    width: 100%;
    height: 72vh;
    box-shadow: 0 35px 50px rgba(15, 23, 42, 0.25);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-modal__close {
    border: none;
    background: none;
    font-size: 1.6rem;
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #94a3b8;
    cursor: pointer;
    z-index: 5;
}

.chat-modal__close:hover {
    color: #1e293b;
}

.chat-modal__header {
    padding: 1rem 1.4rem 0.75rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.chat-modal__header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1f2937;
}

.chat-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.2rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(241, 245, 249, 0.7));
}

.chat-thread {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.chat-message {
    max-width: 68%;
    padding: 0.65rem 0.85rem;
    border-radius: 14px;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    position: relative;
    word-break: break-word;
    line-height: 1.6;
}

.chat-message::after {
    content: attr(data-time);
    display: block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

.chat-message--self {
    align-self: flex-end;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
}

.chat-message--self::after {
    color: rgba(248, 250, 252, 0.75);
    text-align: right;
}

.chat-message--image img {
    max-width: 240px;
    border-radius: 10px;
    display: block;
}

.chat-modal__form {
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    padding: 0.8rem 1.2rem 1.1rem;
    background: #ffffff;
}

.chat-form-row {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
}

.chat-upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
    font-size: 1rem;
    cursor: pointer;
}

.chat-upload-button input[type="file"] {
    display: none;
}

#chat-message-input {
    flex: 1;
    border: 1px solid #d0d7e3;
    border-radius: 12px;
    padding: 0.6rem 0.8rem;
    font-size: 0.95rem;
    resize: none;
    line-height: 1.5;
    background: rgba(248, 250, 252, 0.8);
}

#chat-message-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.chat-modal__footer {
    padding: 0 1.2rem 1rem;
    font-size: 0.82rem;
    color: #f87171;
    min-height: 1.2rem;
}

.application-tags {
    margin-top: 0.6rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.application-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
}

.application-tag.tag-success {
    background: #ecfdf3;
    color: #15803d;
}

.application-tag.tag-warning {
    background: #fef3c7;
    color: #b45309;
}

.application-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.inline-form {
    margin: 0;
    display: inline;
}

.demand-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
}

.demand-actions .btn-link {
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
}

.demand-actions .btn-danger {
    padding: 0.28rem 0.65rem;
}

.demand-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}

.application-status {
    margin-top: 0.9rem;
    font-size: 0.9rem;
    color: #b42318;
}

.application-status-muted {
    color: #94a3b8;
}

@media (max-width: 720px) {
    .profile-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-actions {
        width: 100%;
    }

    .profile-actions .btn {
        width: 100%;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .apply-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .apply-tip {
        margin-left: 0;
    }

    .application-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .application-price {
        align-self: flex-start;
    }
}
.auto-login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.auto-login-overlay.show {
    opacity: 1;
}

.auto-login-modal {
    background: #ffffff;
    border-radius: 18px;
    padding: 2rem;
    width: min(420px, 92vw);
    text-align: center;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
    color: #0f172a;
    transform: translateY(20px);
    transition: transform 0.25s ease, opacity 0.25s ease;
    opacity: 0;
}

.auto-login-overlay.show .auto-login-modal {
    transform: translateY(0);
    opacity: 1;
}

.auto-login-modal h2 {
    margin: 0 0 0.8rem;
    font-size: 1.4rem;
}

.auto-login-modal p {
    margin: 0;
    font-size: 0.95rem;
    color: #475569;
}

.auto-login-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

#auto-login-redirect-btn {
    width: 100%;
    font-size: 1rem;
}

.auto-login-countdown {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.95rem;
    color: #64748b;
}

.auto-login-countdown strong {
    font-size: 1.3rem;
    color: #2563eb;
}

.auto-login-loader {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    margin-bottom: 1.2rem;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid #e2e8f0;
    border-top-color: #2563eb;
    animation: auto-login-spin 0.9s linear infinite;
    flex-shrink: 0;
}

@keyframes auto-login-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 520px) {
    .auto-login-modal {
        padding: 1.6rem;
    }

    .auto-login-loader {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
