/* Apple-inspired design style */
:root {
    --primary-color: #004261;;
    --background-color: #f5f5f7;
    --card-color: #ffffff;
    --text-color: #1d1d1f;
    --text-secondary: #6e6e73;
    --success-color: #34c759;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    overflow: hidden;
    background-color: #f1f1f1;
}

.header-content{
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-right: 120px;
}

header p {
    font-size: 18px;
    padding-top: 55px;
    padding-left: 120px;
    color: #0D9CD8;
    margin: 0;
}

.reset-button {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(238, 90, 36, 0.3);
}

.reset-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(238, 90, 36, 0.4);
    background: linear-gradient(135deg, #ff5252, #d63031);
}

.reset-button:active {
    transform: translateY(0);
}

.reset-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

header a{
    margin: 0;
    padding: 0;
}


header h1 {
    font-weight: 600;
    font-size: 36px;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #007aff, #5856d6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h1, h2{
    color: #0D9CD8;
    padding-bottom: 10px;
    padding-top: 15px;
}



main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.chat-container {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 600px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.message {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-items: flex-end;
}

.message.assistant {
    align-items: flex-start;
}

.message-content {
    padding: 12px 18px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
}

.message.user .message-content {
    background-color: var(--primary-color);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.assistant .message-content {
    background-color: #e9e9eb;
    color: var(--text-color);
    border-bottom-left-radius: 4px;
}

.message.system .message-content {
    background-color: #ff3b30;
    color: white;
    border-radius: 18px;
    margin: 0 auto;
    text-align: center;
}

.chat-input {
    display: flex;
    align-items: center;
    padding: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 24px;
    background-color: #f5f5f7;
    font-family: inherit;
    font-size: 16px;
    outline: none;
}

.chat-input button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-left: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.chat-input button:hover {
    background-color: #001B33;
}

.chat-input button svg {
    width: 20px;
    height: 20px;
}

.form-preview {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
    overflow-y: auto;
    height: 600px;
}

.form-preview h2 {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 22px;
}

.form-instructions {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
    font-weight: 300;
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-field {
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    transition: all 0.3s;
}

.form-field.filled {
    border-color: var(--success-color);
    background-color: rgba(52, 199, 89, 0.05);
}

.field-label {
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-color);
    font-size: 15px;
}

.field-value {
    color: var(--text-secondary);
    font-size: 16px;
    min-height: 24px;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.field-value:focus {
    outline: none;
    background-color: #f0f0f0;
    box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.2);
}

.field-value.modified {
    color: #0D9CD8;
    font-weight: 500;
}

.form-field.filled .field-value {
    color: var(--text-color);
    font-weight: 400;
}

.edit-actions {
    margin-top: 24px;
    text-align: center;
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.edit-actions.show {
    opacity: 1;
    height: 44px;
}

.actionDownload{
    text-align: center;
    padding: 20px;
}
.submitBnt-active{
    background-color: #004261;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    min-width: 150px;
}

.submitBnt-active:hover{
    background-color: #001B33;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    min-width: 150px;
}

.submitBnt-disabled{
    background-color: #a0a0a0;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 15px;
    transition: background-color 0.2s, transform 0.1s;
    min-width: 150px;
}

.inputfield{
    background-color: #004261;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    min-width: 150px;
}

.inputfield:hover{
    background-color: #001B33;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    min-width: 150px;
}

.disabeldTextfield{
    padding: 10px;
    border: none;
    background-color: #f5f5f7;
}

.disabeldTextfield.file-uploaded {
    color: #007700;
}

.save-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    min-width: 150px;
}

.save-button:hover {
    background-color: #001B33;;
}

.save-button:active {
    transform: scale(0.98);
}

.save-button:disabled {
    background-color: #a0a0a0;
    cursor: default;
}

.download-section {
    margin-top: 30px;
    text-align: center;
}

.download-button {
    display: inline-block;
    background-color: var(--success-color);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
    
}

.download-button:hover {
    background-color: #2db748;
}

header .header-download {
    background: linear-gradient(135deg, #0D9CD8, #004261);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(13, 156, 216, 0.3);
}

header .header-download:hover {
    background: linear-gradient(135deg, #0a7fb0, #00324a);
}

footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Responsive design */
@media (max-width: 900px) {
    main {
        grid-template-columns: 1fr;
    }
    
    .chat-container, .form-preview {
        height: 500px;
    }
}



#uploadStatus, #mdUploadStatus {
    margin-top: 0.5em;
    color: #007700;
}