/* DeFi Platform Style CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0F172A;
    color: #FFFFFF;
    line-height: 1.5;
    overflow-x: hidden;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Welcome Section */
.welcome-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.welcome-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    backdrop-filter: blur(10px);
}

.welcome-card p {
    color: #94A3B8;
    font-size: 16px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.welcome-input-section {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Input Group */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    color: #94A3B8;
    font-size: 14px;
    font-weight: 600;
}

.input-container {
    position: relative;
}

/* Wallet Address Input */
#jobIdInput {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 0.95rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#jobIdInput:focus {
    outline: none;
    border-color: #44bCC3;
    background: rgba(255, 255, 255, 0.08);
}

#jobIdInput::placeholder {
    color: #64748B;
}

/* Main Action Button */
.main-action-btn {
    width: 100%;
    padding: 16px 24px;
    background: #44bcc31A;
    color: #44bCC3;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.main-action-btn:hover:not(:disabled) {
    opacity: 0.8;
    transform: translateY(-1px);
}

.main-action-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: #64748B;
    cursor: not-allowed;
    transform: none;
}

/* Chat Messages */
.chat-messages {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    height: calc(100vh - 200px);
    min-height: 600px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.message {
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 12px;
    animation: slideIn 0.3s ease-out;
}

.bot-message {
    background: transparent;
    border: none;
}

.user-message {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-left: 20%;
}

.message-content h4 {
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-content p {
    color: #94A3B8;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
}

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

/* Analyzing Message */
.analyzing-message-parent {
    background: rgba(16, 185, 129, 0.1) !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10B981, #059669);
    border-radius: 2px;
    animation: progressAnimation 2s ease-in-out infinite;
}

@keyframes progressAnimation {
    0% {
        width: 0%;
        transform: translateX(0%);
    }
    50% {
        width: 100%;
        transform: translateX(0%);
    }
    100% {
        width: 100%;
        transform: translateX(100%);
    }
}

/* Job Record Fields (Tier 3 - Lightest inner fields) */
.job-record-field {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 8px 0;
    margin-bottom: 8px;
}

.job-record-field:last-child {
    margin-bottom: 0;
}

.job-record-field strong {
    color: #FFFFFF;
    font-weight: 600;
}

/* Memo Items (Tier 2 - Medium dark) */
.memo-item {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.memo-item:hover {
    background: rgba(51, 65, 85, 0.6);
    border-color: rgba(1, 245, 228, 0.4);
}

.memo-item.selected {
    background: rgba(51, 65, 85, 0.6);
    border-color: #01F5E4;
}

.memo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.memo-id {
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 700;
}

.memo-type {
    padding: 8px 16px;
    background: rgba(1, 245, 228, 0.15);
    color: #01F5E4;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* Status-specific colors */
.memo-type.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
}

.memo-type.status-approved {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
}

.memo-type.status-rejected {
    background: rgba(1, 245, 228, 0.15);
    color: #01F5E4;
}

.memo-content {
    color: #94A3B8;
}

.memo-item h5 {
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.memo-item p {
    color: #94A3B8;
    font-size: 14px;
    margin-bottom: 4px;
}

.memo-item p:last-child {
    margin-bottom: 0;
}

.memo-continue-btn {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.memo-continue-btn .action-btn {
    background: #134E4A !important;
    color: white !important;
    border: 2px solid #134E4A !important;
    box-shadow: none;
    transition: all 0.3s ease;
}

.memo-continue-btn .action-btn:hover {
    opacity: 0.8 !important;
    box-shadow: none;
    transform: none;
}

/* Job Details Card (Tier 1 - Darkest) */
.job-details-card {
    background: #1E293B;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
}

.job-details-card h4 {
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.job-details-card p {
    color: #94A3B8;
    font-size: 14px;
    line-height: 1.6;
}

/* Selected Issue Card */
.selected-issue-card {
    background: #1F2937;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
}

.selected-issue-card h4 {
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.selected-issue-card h5 {
    color: #E2E8F0;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
}

.selected-issue-card .issue-details {
    margin-bottom: 16px;
}

.selected-issue-card .job-record-field {
    background: transparent;
    border: 1px solid #FFFFFF;
    border-radius: 8px;
    padding: 12px;
    color: #94A3B8;
    font-size: 14px;
    margin-bottom: 8px;
}

.selected-issue-card .job-record-field strong {
    color: #FFFFFF;
}

.selected-issue-card .action-btn {
    background: #134E4A !important;
    color: white !important;
    border: 2px solid #134E4A !important;
    box-shadow: none;
    transition: all 0.3s ease;
}

.selected-issue-card .action-btn:hover {
    opacity: 0.8 !important;
    box-shadow: none;
    transform: none;
}

/* Issue Reported/Identified Cards - All fields in one bordered box */
.issue-reported-card .issue-details-box,
.issue-identified-card .issue-details-box {
    border: 1px solid #FFFFFF;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

.issue-reported-card .job-record-field-inline,
.issue-identified-card .job-record-field-inline {
    background: transparent;
    border: none;
    padding: 8px 0;
    color: #94A3B8;
    font-size: 14px;
    margin-bottom: 8px;
}

.issue-reported-card .job-record-field-inline:last-child,
.issue-identified-card .job-record-field-inline:last-child {
    margin-bottom: 0;
}

.issue-reported-card .job-record-field-inline strong,
.issue-identified-card .job-record-field-inline strong {
    color: #FFFFFF;
}

/* Contact Method Selection */
.contact-method-selection .action-btn {
    background: #134E4A !important;
    color: white !important;
    border: none !important;
}

.contact-method-selection .action-btn:hover {
    opacity: 0.8 !important;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.action-btn {
    flex: 1;
    padding: 12px 16px;
    background: #134E4A !important;
    color: white !important;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.action-btn:hover:not(:disabled) {
    opacity: 0.8 !important;
    transform: none;
}

.action-btn:disabled {
    background: #134E4A !important;
    color: #64748B;
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
}

/* Secondary Action Button */
.action-btn-secondary {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    color: #44bCC3;
    border: 2px solid #44bCC3;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.action-btn-secondary:hover:not(:disabled) {
    background: #44bcc31A;
    border-color: #44bCC3;
    color: #44bCC3;
    opacity: 0.8;
    transform: translateY(-1px);
}

.action-btn-secondary:disabled {
    border-color: rgba(255, 255, 255, 0.1);
    color: #64748B;
    cursor: not-allowed;
    transform: none;
}

/* Submit Button */
#submitBtn {
    flex: 1;
    padding: 12px 16px;
    background: #134E4A !important;
    color: white !important;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

#submitBtn:hover:not(:disabled) {
    opacity: 0.8 !important;
    transform: none;
}

#submitBtn:disabled {
    background: #134E4A !important;
    color: #64748B;
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
}

/* Input Fields */
.input-field {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.input-field:focus {
    border-color: #FFFFFF;
    background: rgba(255, 255, 255, 0.08);
}

.input-field::placeholder {
    color: #64748B;
}

/* Success Message */
.success-message {
    background: rgba(68, 188, 195, 0.1);
    border: 1px solid rgba(68, 188, 195, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.success-message h4 {
    color: #44bCC3;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.success-message p {
    color: #94A3B8;
    font-size: 14px;
    line-height: 1.5;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 11, 13, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    text-align: center;
    color: #FFFFFF;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #10B981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.loading-spinner p {
    font-size: 16px;
    font-weight: 500;
    color: #94A3B8;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding: 16px;
    }
    
    .welcome-card {
        padding: 24px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .main-action-btn {
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* Snackbar notification styles */
.snackbar {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1F2937;
  color: #FFFFFF;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10000;
  animation: slideUp 0.3s ease-out;
  max-width: 500px;
  font-size: 0.95rem;
  font-weight: 500;
}

.snackbar.error {
  background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%);
  border: 1px solid #FCA5A5;
}

.snackbar.success {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border: 1px solid #6EE7B7;
}

.snackbar.warning {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  border: 1px solid #FCD34D;
}

.snackbar i {
  font-size: 1.2rem;
}

@keyframes slideUp {
  from {
    bottom: -100px;
    opacity: 0;
  }
  to {
    bottom: 30px;
    opacity: 1;
  }
}
