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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Loading mask overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

    .loading-overlay.show {
        display: flex !important;
    }

    .loading-overlay .spinner-border {
        width: 3rem;
        height: 3rem;
        color: #fff;
    }

    .loading-overlay p {
        color: #fff;
        margin-top: 12px;
        font-size: 1rem;
    }

.container {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: visible;
    position: relative;
    z-index: 1;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px;
    text-align: center;
}

.header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.header p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.nav-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #667eea;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s;
}

.nav-btn:hover {
    background: #764ba2;
    transform: scale(1.1);
}

.nav-btn:active {
    transform: scale(0.95);
}

.current-month {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.calendar {
    padding: 15px;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.weekday {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    padding: 8px 0;
}

.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    color: #999;
    position: relative;
}

.day.has-content {
    background: #10b981;
    color: #fff;
    font-weight: 600;
}

.day.has-content:hover {
    background: #059669;
    transform: scale(1.1);
}

.day.selected {
    background: #fde047 !important;
    color: #1f2937 !important;
    font-weight: 700;
    box-shadow: 0 0 0 2px #facc15;
}

.day.empty {
    cursor: default;
}

.day:active:not(.empty) {
    transform: scale(0.9);
}

.icon-btn {
    text-align: center;
    padding: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-row {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.icon-btn.show {
    display: inline-flex;
}

.icon-btn.hide {
    display: none;
}

.icon-btn span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #667eea;
    color: #fff;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: background 0.3s, transform 0.2s;
}

.icon-btn span:hover {
    background: #764ba2;
    transform: scale(1.1);
}

.detail-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.detail-section.show {
    max-height: 1000px;
    transition: max-height 0.5s ease-in;
}

.detail-content {
    padding: 20px;
}

.detail-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.detail-item {
    margin-bottom: 15px;
}

.detail-item h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-item h3::before {
    content: '';
    width: 4px;
    height: 16px;
    background: #667eea;
    border-radius: 2px;
}

.detail-item ul {
    list-style: none;
    padding-left: 12px;
}

.detail-item li {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 6px;
    line-height: 1.5;
}

.detail-item li::before {
    content: '•';
    color: #667eea;
    margin-right: 8px;
}

.close-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 15px;
    transition: background 0.3s;
}

.close-btn:hover {
    background: #764ba2;
}

/* Modal styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.show {
    display: flex !important;
}

.modal {
    display: block !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    margin: auto !important;
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    max-width: 90%;
    width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal.password {
    height: 300px;
}

.modal h2 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.modal input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 15px;
    text-align: center;
}

.modal input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
}

.modal-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background 0.3s;
}

.modal-btn.primary {
    background: #667eea;
    color: #fff;
}

.modal-btn.primary:hover {
    background: #764ba2;
}

.modal-btn.secondary {
    background: #e0e0e0;
    color: #666;
}

.modal-btn.secondary:hover {
    background: #d0d0d0;
}

.error-msg {
    color: #e74c3c;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 10px;
    display: none;
}

.error-msg.show {
    display: block;
}

/* Form styles */
.feedback-form {
    display: none;
}

.feedback-form.show {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 1rem;
    color: #333;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
}

.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-date {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.footer {
    text-align: center;
    padding: 15px;
    color: #999;
    font-size: 0.8rem;
}

.modal.ocr-content {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.modal.ocr-content h2 {
    margin-top: 0;
    font-size: 1.25rem;
}

.ocr-hint {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

#ocrContentEdit {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.95rem;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    justify-content: flex-end;
}

.modal-btn.primary {
    background: #28a745;
    color: #fff;
}

.modal-btn.primary:hover {
    background: #218838;
}

.modal-btn.secondary {
    background: #6c757d;
    color: #fff;
}

.modal-btn.secondary:hover {
    background: #5a6268;
}
    body {
        padding: 10px;
    }

    .container {
        border-radius: 12px;
    }

    .header h1 {
        font-size: 1.3rem;
    }

    .nav {
        padding: 12px 15px;
    }

    .nav-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .current-month {
        font-size: 1rem;
    }

    .calendar {
        padding: 10px;
    }

    .weekday {
        font-size: 0.75rem;
        padding: 6px 0;
    }

    .day {
        font-size: 0.85rem;
    }

    .detail-content {
        padding: 15px;
    }
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 12px;
    font-size: 0.8rem;
    color: #888;
}

.site-footer a {
    color: white;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* ==========================================
   automlTable.cshtml styles
   ========================================== */
.automl-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.automl-container .title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 40px;
    text-align: center;
}

.automl-container .upload-section {
    margin: 30px 0;
}

.automl-container .upload-btn {
    display: inline-block;
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.automl-container .upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.automl-container .upload-note {
    display: block;
    margin-top: 12px;
    color: #666;
    font-size: 0.95rem;
}

.automl-container .ocr-btn {
    display: none;
    margin: 30px auto;
    padding: 16px 32px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.automl-container .ocr-btn.visible {
    display: inline-block;
}

.automl-container .ocr-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(17, 153, 142, 0.4);
}

.automl-container .ocr-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.automl-container #file-input {
    display: none;
}

.automl-container #uploadImage {
    max-width: 100%;
    max-height: 400px;
    margin-top: 20px;
    border-radius: 8px;
    display: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.automl-container #uploadImage.visible {
    display: block;
}

.automl-container .result-section {
    margin-top: 30px;
    text-align: left;
    display: none;
}

.automl-container .result-section.visible {
    display: block;
}

.automl-container .result-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.automl-container .result-content {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    font-size: 0.85rem;
    max-width: 100%;
    overflow-x: auto;
}

.automl-container .result-summary {
    background: #e8f5e9;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    text-align: left;
    font-size: 0.9rem;
}

.automl-container .result-summary div {
    margin: 4px 0;
}

.automl-container .result-summary .label {
    font-weight: 600;
    color: #555;
    display: inline-block;
    min-width: 100px;
}

.automl-container .btn-call-aiagent {
    display: none;
    margin: 16px auto;
    padding: 12px 24px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.automl-container .btn-call-aiagent.visible {
    display: inline-block;
}

.automl-container .btn-call-aiagent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}

.automl-container .loading {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.automl-container .loading.visible {
    display: block;
}

.automl-container .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin-animation 1s linear infinite;
    margin: 0 auto;
}

.automl-container .error-msg {
    color: #dc3545;
    margin-top: 10px;
    display: none;
}

.automl-container .error-msg.visible {
    display: block;
}

@keyframes spin-animation {
    to { transform: rotate(360deg); }
}

/* ==========================================
   Document section styles
   ========================================== */
.document-section {
    padding: 16px;
    border-top: 1px solid #eee;
    display: none;
}

.document-section.visible {
    display: block;
}

.document-section h4 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: #333;
}

.document-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.document-item {
    max-width: 100%;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.document-item img {
    max-width: 100%;
    max-height: 200px;
    display: block;
    margin: 0 auto;
}

.document-item a {
    display: block;
    padding: 12px;
    color: #667eea;
    text-decoration: none;
    font-size: 0.85rem;
    word-break: break-all;
    text-align: center;
}

.document-item a:hover {
    background: #eef;
}

/* ==========================================
   aiagent.cshtml styles
   ========================================== */
.aiagent-container {
    max-width: 100%;
    padding: 16px;
}

.aiagent-header {
    text-align: center;
    margin-bottom: 24px;
}

.aiagent-header h2 {
    font-size: 1.5rem;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.aiagent-header p {
    color: #666;
    font-size: 0.9rem;
}

.image-preview-section {
    margin-bottom: 20px;
}

.image-preview {
    max-width: 100%;
    max-height: 250px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
}

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

.input-section {
    margin-bottom: 20px;
}

.input-section label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.input-section input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.input-section input:focus {
    outline: none;
    border-color: #667eea;
}

.model-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
    background-color: #fff;
    cursor: pointer;
}

.model-select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-read-invoice {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-read-invoice:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-read-invoice:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Dremel Agent Styles */
.dremel-agent-container {
    max-width: 100%;
    padding: 16px;
}

.dremel-agent-header {
    text-align: center;
    margin-bottom: 24px;
}

.dremel-agent-header h2 {
    font-size: 1.5rem;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.dremel-agent-header p {
    color: #666;
    font-size: 0.9rem;
}

.upload-section {
    margin-bottom: 20px;
}

.upload-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.upload-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.upload-note {
    color: #666;
    font-size: 0.85rem;
}

.btn-submit {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.image-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.preview-item {
    position: relative;
    width: 120px;
    height: 120px;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    line-height: 24px;
    text-align: center;
}

.btn-remove:hover {
    background: rgba(255, 0, 0, 1);
}

.loading-section {
    display: none;
    text-align: center;
    padding: 30px;
}

.loading-section.visible {
    display: block;
}

.loading-section .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin-animation 1s linear infinite;
    margin: 0 auto 12px;
}

.result-section {
    display: none;
    margin-top: 24px;
}

.result-section.visible {
    display: block;
}

.result-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    overflow: hidden;
}

.token-info {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.15);
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.result-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.result-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-copy {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-copy:hover {
    background: rgba(255,255,255,0.3);
}

.result-card-body {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.json-display {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    color: #333;
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.json-key {
    color: #0066cc;
    font-weight: 600;
}

.json-string {
    color: #c92a2a;
}

.json-number {
    color: #40a977;
}

.json-boolean {
    color: #f76707;
}

.json-null {
    color: #868e96;
}

.error-message {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 16px;
    color: #c53030;
    margin-top: 16px;
    display: none;
}

.error-message.visible {
    display: block;
}

.toggle-json-btn {
    background: #f1f3f4;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
    margin-top: 12px;
    width: 100%;
}

.toggle-json-btn:hover {
    background: #e2e6ea;
}

.raw-json-section {
    display: none;
    margin-top: 12px;
}

.raw-json-section.visible {
    display: block;
}

@media (min-width: 768px) {
    .aiagent-container {
        max-width: 700px;
        margin: 0 auto;
        padding: 40px 20px;
    }

    .aiagent-header h2 {
        font-size: 1.8rem;
    }

    .btn-read-invoice {
        width: auto;
        padding: 14px 40px;
    }

    .result-card-body {
        padding: 20px;
    }
}

/* Screenshots Gallery Styles */
.screenshots-section {
    margin-top: 24px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
}

.screenshots-section h3 {
    margin-bottom: 12px;
    font-size: 1.1rem;
    color: #333;
}

.screenshots-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.screenshot-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
}

.screenshot-item:hover {
    transform: scale(1.05);
    border-color: #667eea;
}

.screenshot-item.selected {
    border-color: #667eea;
}

.screenshot-item.selected::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.3);
}

.screenshot-checkbox {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 2;
}

.screenshot-cb {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.screenshot-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.btn-select-all, .btn-use-selected {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-right: 8px;
    transition: background-color 0.2s;
}

.btn-select-all {
    background: #e0e0e0;
    color: #333;
}

.btn-select-all:hover {
    background: #d0d0d0;
}

.btn-use-selected {
    background: #667eea;
    color: white;
}

.btn-use-selected:hover {
    background: #5a6fd6;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.lightbox.visible {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10000;
}

.lightbox-img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: 8px;
}

/* Responsive adjustments for dremel-agent */
@media (min-width: 768px) {
    .dremel-agent-container {
        max-width: 800px;
        margin: 0 auto;
        padding: 40px 20px;
    }

    .dremel-agent-header h2 {
        font-size: 1.8rem;
    }

    .btn-submit {
        width: auto;
        padding: 14px 40px;
    }

    .screenshots-gallery {
        gap: 16px;
    }

    .screenshot-item {
        width: 120px;
        height: 120px;
    }
}

/* Dremel History Page Styles */
.btn-history {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-history:hover {
    background: #5a6fd6;
}

.history-actions {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.btn-back {
    padding: 8px 16px;
    background: #e0e0e0;
    color: #333;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-back:hover {
    background: #d0d0d0;
}

.btn-clear {
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-clear:hover {
    background: #c82333;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.history-item {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.history-date {
    color: #666;
    font-size: 0.85rem;
}

.history-model {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.history-item-images {
    margin-bottom: 10px;
}

.history-label {
    color: #666;
    font-size: 0.85rem;
    margin-right: 8px;
    display: block;
    margin-bottom: 8px;
}

.history-images-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.history-image-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 120px;
}

.history-image-thumb {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    transition: border-color 0.2s, transform 0.2s;
}

.history-image-thumb:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.history-image-url {
    font-size: 0.7rem;
    color: #888;
    margin-top: 4px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.history-item-result {
    margin-bottom: 10px;
}

.history-result-text {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 150px;
    overflow-y: auto;
    margin: 5px 0 0 0;
}

.history-item-tokens {
    color: #888;
    font-size: 0.8rem;
}

.no-history {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Password Overlay Styles */
.password-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.password-modal {
    background: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
}

.password-modal h2 {
    margin-bottom: 8px;
    color: #333;
}

.password-modal p {
    margin-bottom: 20px;
    color: #666;
}

.password-modal input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.password-modal input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
}

.password-modal button {
    padding: 12px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.password-modal button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.password-error {
    color: #dc3545;
    margin-top: 12px;
    font-size: 0.9rem;
}

