.trade-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 16px;
}

@media (max-width: 1100px) {
    .trade-grid {
        grid-template-columns: 1fr;
    }
}

.trade-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#bar-icon {
    display: none;
    color: #64748b;
}

@media (max-width: 900px) {
    #bar-icon {
        display: inline-flex;
    }
}

.trade-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.image-card {
    padding: 12px;
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.entry-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.entry-title2 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.entry-description {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.img-frame {
    border: 1px dashed #cbd5f5;
    border-radius: 12px;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    text-align: center;
    padding: 16px;
}

.real-img {
    border-style: solid;
    border-color: #e2e8f0;
    object-fit: contain;
    width: 100%;
    max-height: 280px;
}

.upload-icon {
    width: 20px;
    height: 20px;
}

.upload-img {
    margin: 0;
    font-weight: 600;
    color: #0f172a;
}

.upload-description {
    margin: 0;
    font-size: 12px;
    color: #94a3b8;
}

.analyze-status {
    margin: 0;
    font-size: 12px;
    color: #64748b;
    display: none;
}

.section-block {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.link-title {
    margin: 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
}

.link-flexdiv {
    display: flex;
    gap: 10px;
    align-items: center;
}

.link-flexbox-div {
    flex: 1;
    position: relative;
}

.link-flexbox-button {
    flex: 0 0 auto;
}

.entry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.entry-grid.single-column {
    grid-template-columns: 1fr;
}

.mainframe-loading {
    position: fixed;
    right: 24px;
    bottom: 24px;
    transform: translateY(200px);
    transition: transform 0.3s ease;
    z-index: 80;
}

.loading-frame {
    display: none;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
    font-size: 12px;
    color: #475569;
}

.spin-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 720px) {
    .entry-grid {
        grid-template-columns: 1fr;
    }
}

.flexbox-div {
    position: relative;
}

.dropdown-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 6px 10px;
    background: #ffffff;
    cursor: pointer;
    font-size: 12px;
}

.dropdown-div {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    z-index: 10;
    display: none;
    max-height: 220px;
    overflow-y: auto;
}

.dropdown-item,
.settings-listitem {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 8px 10px;
    font-size: 12px;
    cursor: pointer;
}

.dropdown-item:hover,
.settings-listitem:hover {
    background: #f1f5f9;
}

.entry-input,
.entry-input2,
.entry-textarea,
.settings-input,
.reflection-textarea,
.reflection-dropdown,
.reflection-text-input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    background: #ffffff;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: #0f172a;
}

.reflection-textarea::placeholder,
.reflection-text-input::placeholder {
    color: #94a3b8;
}

.entry-input2 {
    font-size: 13px;
}

.entry-textarea,
.reflection-textarea {
    min-height: 120px;
    resize: vertical;
}

.bottom-div {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.inline-button {
    margin-left: 8px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    padding: 0;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 600;
}

.compliance-list {
    display: grid;
    gap: 6px;
}

.extracted-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.extracted-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.extracted-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
}

.extracted-value {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.extracted-empty {
    margin: 0;
    font-size: 12px;
    color: #94a3b8;
}

.compliance-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #475569;
}

.compliance-checkbox {
    width: 14px;
    height: 14px;
    accent-color: #00ff99;
    border: 1px solid #cbd5f5;
    background-color: #ffffff;
}

.settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 60;
    padding: 24px;
}

.settings-overlay[style*="display: block"] {
    display: flex;
}

.settings-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    width: min(520px, 92vw);
    display: none;
    flex-direction: column;
    gap: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.settings-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.settings-list {
    display: grid;
    gap: 6px;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 70;
    padding: 24px;
}

.modal[style*="display: block"] {
    display: flex;
}

.modal-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px;
    width: min(520px, 92vw);
    display: grid;
    gap: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.modal-card.wide {
    width: min(820px, 92vw);
}

.modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.modal-subtitle {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.modal-options {
    display: grid;
    gap: 8px;
}

.trade-ranking-option,
.reflection-option {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    color: #0f172a;
}

.trade-ranking-option.selected,
.reflection-option.selected {
    border-color: #1f2937;
    background: #e2e8f0;
    color: #0f172a;
}

.ai-loading-progress {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.ai-loading-progress-bar {
    height: 100%;
    width: 0;
    background: #00ff99;
}

.reflection-form {
    display: grid;
    gap: 16px;
}

.reflection-question-text {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.reflection-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reflection-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

body.dark .entry-title2,
body.dark .upload-img {
    color: #ffffff;
}

body.dark .entry-description,
body.dark .upload-description,
body.dark .modal-subtitle,
body.dark .compliance-checkbox-item {
    color: #8c98a4;
}

body.dark .inline-button {
    color: #8c98a4;
}

body.dark .img-frame,
body.dark .section-block {
    background: #0f1317;
    border-color: rgba(128, 128, 128, 0.25);
}

body.dark .extracted-item {
    background: #14181f;
    border-color: rgba(128, 128, 128, 0.25);
}

body.dark .extracted-value {
    color: #ffffff;
}

body.dark .dropdown-button,
body.dark .entry-input,
body.dark .entry-input2,
body.dark .entry-textarea,
body.dark .settings-input,
body.dark .reflection-textarea,
body.dark .reflection-dropdown,
body.dark .reflection-text-input {
    background: #0f1317;
    border-color: rgba(128, 128, 128, 0.25);
    color: #ffffff;
}

body.dark .reflection-textarea::placeholder,
body.dark .reflection-text-input::placeholder {
    color: #8c98a4;
}

body.dark .dropdown-div,
body.dark .modal-card,
body.dark .settings-card {
    background: #14181f;
    border-color: rgba(128, 128, 128, 0.25);
}

body.dark .modal-title,
body.dark .reflection-question-text {
    color: #ffffff;
}

body.dark .badge-pill,
body.dark .compliance-list,
body.dark .compliance-checkbox-item,
body.dark #compliance-badge {
    border-color: rgba(128, 128, 128, 0.25);
}

body.dark .dropdown-item:hover,
body.dark .settings-listitem:hover,
body.dark .trade-ranking-option,
body.dark .reflection-option {
    background: #191d23;
    border-color: rgba(128, 128, 128, 0.25);
}

body.dark .trade-ranking-option,
body.dark .reflection-option {
    color: #e6e8eb;
}

body.dark .trade-ranking-option.selected,
body.dark .reflection-option.selected {
    background: #0f1317;
    border-color: #ffffff;
    color: #ffffff;
}

body.dark .compliance-checkbox {
    accent-color: #00ff99;
    border-color: rgba(128, 128, 128, 0.35);
    background-color: #0f1317;
}

body.dark .ai-loading-progress {
    background: #222832;
}

body.dark .loading-frame {
    background: #14181f;
    border-color: rgba(128, 128, 128, 0.25);
    color: #8c98a4;
}

