/* Frontend CSS for Kira Job Manager */
.kjm-projects-wrapper {}

.kjm-projects-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.kjm-projects-wrapper h3 {
    margin-top: 0 !important;
}

.kjm-projects-table th,
.kjm-projects-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.kjm-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.kjm-status-pending {
    background: #fdf0d5;
    color: #b7791f;
}

.kjm-status-processing {
    background: #e0f2fe;
    color: #0369a1;
}

.kjm-status-completed {
    background: #dcfce7;
    color: #15803d;
}

.kjm-status-cancelled {
    background: #fee2e2;
    color: #b91c1c;
}

.kjm-btn {
    background: #007cba;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.kjm-btn:hover {
    background: #006ba1;
    color: #fff;
}

.kjm-project-details h2 {
    margin-top: 0 !important;
}

.kjm-btn-outline {
    background: transparent;
    color: #007cba;
    border: 1px solid #007cba;
}

.kjm-btn-outline:hover {
    background: #007cba;
    color: #fff;
}

.kjm-tree-content h4 {
    font-size: 18px;
    margin-bottom: 15px;
}

.kjm-tree-content p {
    font-size: 14px;
}

.kjm-tree-content {
    font-size: 14px;
}

.kjm-upload-section h4,
.kjm-upload-section h3,
.kjm-feedback-form h4 {
    font-size: 15px;
}

.kjm-project-meta {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    font-size: 14px;
    gap: 10px;
}

.kjm-project-meta p {
    margin-bottom: 0 !important;
}

.kjm-tasks-box {
    margin-bottom: 30px;
}

.kjm-tasks-list {
    list-style: none;
    padding: 0 !important;
}

.kjm-task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    margin-bottom: 10px;
}

.kjm-task-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.kjm-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}

.badge-pending {
    background: #eee;
    color: #666;
}

.badge-processing {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-feedback {
    background: #fef08a;
    color: #854d0e;
}

.badge-completed {
    background: #dcfce7;
    color: #15803d;
}

.kjm-task-dates {
    display: flex;
    flex-direction: column;
    font-size: 11px;
    color: #777;
    margin-right: 15px;
}

.kjm-feedback-section {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.kjm-comments-list {
    margin-bottom: 20px;
}

.kjm-comment {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    max-width: 80%;
}

.kjm-comment-admin {
    background: #f0f7ff;
    margin-right: auto;
    border-left: 3px solid #007cba;
}

.kjm-comment-client {
    background: #f9f9f9;
    margin-left: auto;
    border-right: 3px solid #10b981;
    text-align: right;
}

.kjm-comment-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.kjm-feedback-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 10px;
    font-family: inherit;
}

.kjm-alert {
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #007cba;
    border-radius: 4px;
}

.kjm-alert.error {
    border-left-color: #d63638;
}

.kjm-back-link {
    display: inline-block;
    margin-bottom: 15px;
    color: #666;
    text-decoration: none;
}

.kjm-back-link:hover {
    color: #000;
}

/* Project Description */
.kjm-project-description {
    margin-bottom: 24px;
    padding: 20px;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
}

.kjm-project-description h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 16px;
}

.kjm-desc-content {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
}

.kjm-desc-content p:last-child {
    margin-bottom: 0;
}

/* Finance Box */
.kjm-finance-box {
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #fafafa, #f0f7ff);
    border: 1px solid #d0e3f7;
    border-radius: 8px;
}

.kjm-finance-box h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 16px;
}

.kjm-finance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.kjm-finance-item {
    text-align: center;
    padding: 12px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.kjm-fin-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kjm-fin-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.kjm-fin-deposit {
    color: #0369a1;
}

.kjm-fin-remaining {
    color: #d63638;
}

.kjm-fin-paid {
    color: #15803d;
}

/* Feedback status badge */
.kjm-status-feedback {
    background: #fef08a;
    color: #854d0e;
}

/* AI Tree Frontend */
.kjm-project-ai-tree {
    margin-bottom: 24px;
    padding: 20px;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
}

.kjm-tree-wrapper {
    position: relative;
    max-height: 300px;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.kjm-tree-wrapper.expanded {
    max-height: 5000px;
    /* Large enough to show all */
}

.kjm-tree-content ul {
    padding-left: 20px;
    margin: 0;
    list-style-type: disc;
}

.kjm-tree-content li {
    margin-bottom: 5px;
    color: #444;
}

.kjm-tree-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
    pointer-events: none;
    transition: opacity 0.3s;
}

.kjm-tree-wrapper.expanded .kjm-tree-overlay {
    opacity: 0;
}

.kjm-tree-expand {
    text-align: center;
    margin-top: 15px;
}

/* Gallery Frontend */
.kjm-gallery-box {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
}

.kjm-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.kjm-gallery-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #eee;
    transition: transform 0.2s;
}

.kjm-gallery-item img:hover {
    transform: scale(1.05);
}

.kjm-upload-section {
    background: #fdf2f2;
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
}

.kjm-upload-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.kjm-upload-controls input[type="file"] {
    flex: 1;
    font-size: 13px;
}

@media (max-width: 600px) {
    .kjm-finance-grid {
        grid-template-columns: 1fr;
    }

    .kjm-upload-controls {
        flex-direction: column;
        align-items: flex-start;
    }
}