.tr-word-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1e293b;
}

.tr-header {
    text-align: center;
    margin-bottom: 40px;
}
.tr-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.tr-source-text {
    font-size: 14px;
    color: #444;
    white-space: pre-wrap; /* Preserve line breaks */
}
.tr-header p {
    font-size: 1.1rem;
    color: #64748b;
}

.tr-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
    margin: 0 auto;
    max-width: 600px;
    transition: all 0.3s ease;
}

.tr-card.full-width {
    max-width: 100%;
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* Inputs & Buttons */
.tr-input-group {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}
input[type="text"], input[type="password"], select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}
input:focus, select:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.tr-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}
.tr-btn:active {
    transform: scale(0.98);
}
.tr-btn.primary {
    background: #6366f1;
    color: white;
}
.tr-btn.primary:hover {
    background: #4f46e5;
}
.tr-btn.success {
    background: #10b981;
    color: white;
}
.tr-btn.secondary {
    background: #f1f5f9;
    color: #475569;
}
.tr-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Upload Area */
.tr-upload-area {
    border: 3px dashed #cbd5e1;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
}
.tr-upload-area:hover, .tr-upload-area.dragover {
    border-color: #6366f1;
    background: #eef2ff;
}
.tr-upload-area .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #94a3b8;
    margin-bottom: 10px;
}

/* Table */
.tr-table-container {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin: 20px 0;
}
.tr-table {
    width: 100%;
    border-collapse: collapse;
}
.tr-table th {
    background: #f1f5f9;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}
.tr-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}
.tr-table tr:hover td {
    background: #f8fafc;
}

textarea.tr-edit-cell {
    width: 100%;
    min-height: 60px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 8px;
    font-family: inherit;
    resize: vertical;
}

/* Utility */
.tr-status {
    margin-top: 10px;
    font-weight: 500;
}
.tr-status.error { color: #ef4444; }
.tr-status.success { color: #10b981; }

.tr-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.tr-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
.tr-success-icon {
    text-align: center;
    margin-bottom: 20px;
}
.tr-success-icon .dashicons {
    font-size: 80px;
    width: 80px;
    height: 80px;
    color: #10b981;
}
