body {
    background: #f4f6fb;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 90%;
    margin: 60px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 40px 56px 28px 56px;
}

h1 {
    font-size: 1.7rem;
    margin-bottom: 1.5rem;
    color: #2d3748;
    text-align: center;
}

.form-group input[type="url"],
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[readonly],
.form-group textarea,
.form-group input[type="file"],
.form-group select {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    background: #f9fafb !important;
    color: #374151 !important;
    margin-bottom: 0.5rem;
    transition: border 0.2s;
    outline: none;
    appearance: none;
}

.form-group input[type="email"]:focus,
.form-group input[type="email"]:active {
    border-color: #3182ce;
    background: #f9fafb !important;
    color: #374151 !important;
    outline: none;
}

input:-webkit-autofill,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #f9fafb inset !important;
    box-shadow: 0 0 0 1000px #f9fafb inset !important;
    -webkit-text-fill-color: #374151 !important;
    color: #374151 !important;
    border: 1px solid #3182ce !important;
}

.form-group input[type="file"] {
    padding: 0.3rem 0.8rem;
    background: #fff;
}

.form-group input[readonly] {
    background: #e2e8f0;
    color: #4a5568;
    cursor: not-allowed;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: #4a5568;
    font-weight: 500;
}

.form-group small {
    display: block;
    margin-top: -0.3rem;
    margin-bottom: 0.7rem;
    color: #718096;
}

.form-group button,
#fetchTranscriptBtn,
#sendMessageBtn,
#startBotBtn,
#retrieveTranscriptBtn,
#airiaCallNotesBtn {
    width: 100%;
    padding: 0.7rem;
    background: #3182ce;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1.05rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 0.5rem;
    box-sizing: border-box;
}

.form-group button:hover,
#fetchTranscriptBtn:hover,
#sendMessageBtn:hover,
#startBotBtn:hover,
#retrieveTranscriptBtn:hover,
#airiaCallNotesBtn:hover {
    background: #2563eb;
}

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

.transcript {
    margin-top: 1.2rem;
    padding: 1rem;
    border-radius: 6px;
    background: #f9fafb;
    color: #374151;
    font-size: 0.98rem;
    min-height: 60px;
    white-space: pre-wrap;
    border: 1px solid #cbd5e1;
}

.response {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.98rem;
    word-break: break-all;
    background: #f1f5f9;
    color: #374151;
    display: none;
}

.response.success {
    display: block;
    border: 1px solid #38a169;
    background: #38a169;
    color: #22543d;
}

.response.error {
    display: block;
    border: 1px solid #e53e3e;
    background: #fff5f5;
    color: #9b2c2c;
}

.form-group input.success,
.form-group textarea.success {
    border: 1px solid #38a169;
    background: #38a169;
    color: #22543d;
}
.form-group input.error,
.form-group textarea.error {
    border: 1px solid #e53e3e;
    background: #fff5f5;
    color: #9b2c2c;
}

textarea.success,
.form-group textarea.success {
    border: 1px solid #38a169 !important;
    background: #e6ffe6 !important;
    color: #22543d !important;
}

.collapsible-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 1.5rem;
}
.collapsible-header::after {
    content: "▼";
    position: absolute;
    right: 0.5rem;
    font-size: 1rem;
    transition: transform 0.2s;
}
.section-block.collapsed .collapsible-header::after {
    transform: rotate(-90deg);
}
.section-content {
    transition: max-height 0.3s ease;
    overflow: hidden;
    max-height: 2000px;
}
.section-block.collapsed .section-content {
    max-height: 0;
    padding: 0;
}

.section-block {
    margin-bottom: 2.5rem;
}

/* History Section Styles */
#history-section {
    margin-top: 0;
}
#history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
    background: #f9fafb;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.98rem;
}
#history-table th, #history-table td {
    border: 1px solid #e2e8f0;
    padding: 8px 10px;
    text-align: left;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#history-table th {
    background: #f4f4f4;
    color: #2d3748;
    font-weight: 600;
}
#history-table tbody tr:nth-child(even) {
    background: #f7fafc;
}
#history-table tbody tr:hover {
    background: #e6f7ff;
}
.history-type.bot {
    color: #2563eb;
    font-weight: bold;
}
.history-type.transcript {
    color: #2563eb;
    font-weight: bold;
}
.history-type.note {
    color: #2563eb;
    font-weight: bold;
}
button.history-load-btn, button.history-view-btn {
    padding: 4px 12px;
    border-radius: 4px;
    border: none;
    background: #3aafa9;
    color: #fff;
    cursor: pointer;
    font-size: 0.97rem;
    transition: background 0.2s;
}
button.history-load-btn:hover {
    background: #d02d2d;
}
button.history-view-btn {
    background: #2563eb;
}
button.history-view-btn:hover {
    background: #d02d2d;
}
